gitlab-org--gitlab-foss/lib
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
assets
backup Backups do not fail anymore when using tar on annex and custom_hooks 2016-10-27 11:24:35 +01:00
banzai Merge branch 'markdown-xss-fix-option-2.1' into 'security' 2016-11-09 12:26:44 +01:00
ci Improve naming convention in ci configuration module 2016-11-14 10:31:45 +01:00
constraints Add small improvements to constrainers and specs 2016-11-08 14:32:42 +02:00
container_registry
generators/rails/post_deployment_migration require rails/generators for generators 2016-11-01 21:44:27 +01:00
gitlab Merge branch 'stanhu/gitlab-ce-fix-error-500-with-mr-images' into 'master' 2016-11-15 10:22:36 +00:00
json_web_token
omni_auth
rouge/formatters
support
tasks Improve EeCompatCheck, cache EE repo and keep artifacts for the ee_compat_check task 2016-11-10 10:40:47 +01:00
banzai.rb Add markdown cache columns to the database, but don't use them yet 2016-10-07 02:54:25 +01:00
disable_email_interceptor.rb
event_filter.rb Differentiate the expire from leave event 2016-10-20 00:26:45 +00:00
expand_variables.rb
extracts_path.rb Remove 'extended_sha1' option from ExtractsPath module 2016-11-06 12:33:39 +09:00
file_size_validator.rb
file_streamer.rb
gitlab.rb
gt_one_coercion.rb
repository_cache.rb
static_model.rb
unfold_form.rb
uploaded_file.rb
version_check.rb