gitlab-org--gitlab-foss/spec/requests
Rémy Coutable 46eb0ebfd2 Merge branch '23584-triggering-builds-from-webhooks' into 'master'
Add ref parameter for triggering builds with gitlab webhook from other project.

Currently GitLab can trigger builds from external tools like curl.
But there is no way to trigger builds with webhook from another GitLab project.
Executing webhook like `/projects/:id/trigger/builds?token=TOKEN&ref=master` results in such message from server:
```
400 No builds created
```

Problem is the ref from request body takes precedence of the ref from query string.
System tries to trigger build for nonexistent branch instead of `master`.
This is the feature of the Grape framework used to build GitLab api.

This MR adds optional `ref` parameter into the api url:
```
/projects/:id/ref/:ref/trigger/builds?token=TOKEN
```

This will lead that the ref in the url will have precedence of the ref inside request body.

This solution provides compatibility with current API urls.

Closes #23584

See merge request !7022
2016-11-15 20:37:04 +00:00
..
api Merge branch '23584-triggering-builds-from-webhooks' into 'master' 2016-11-15 20:37:04 +00:00
ci/api Make specs a bit faster 2016-11-01 14:46:59 +02:00
projects Path could also have slashes! Feedback: 2016-08-24 16:02:56 +08:00
git_http_spec.rb Merge branch 'fix-unathorized-cloning' into 'security' 2016-11-09 12:27:17 +01:00
jwt_controller_spec.rb Merge branch 'unauthenticated-container-registry-access' into 'security' 2016-11-09 12:28:29 +01:00
lfs_http_spec.rb Allow owners to fetch source code in CI builds 2016-11-01 09:37:20 +01:00