diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-30 12:21:33 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-30 12:21:33 +0100 |
commit | 00ca7adca2de8ff05cca3df9eb2df8a67f638cfe (patch) | |
tree | 86764da0f493a7169b2fea59e5618b669cd64d56 /doc/api/merge_requests.md | |
parent | adb3f3d4e494e8f8d41c1b9e676e395a49cd96b2 (diff) | |
parent | 7e5fa10b665835e3160eee4d333a17fbaef9c113 (diff) | |
download | gitlab-ce-00ca7adca2de8ff05cca3df9eb2df8a67f638cfe.tar.gz |
Merge branch 'master' into fix/rename-mwbs-to-merge-when-pipeline-succeeds
* master: (110 commits)
Rewrite an HTTP link to use HTTPS
Edit /spec/features/profiles/preferences_spec.rb to match changes in 084d90ac
Add blue back to sub nav active
Remove JSX/React eslint plugins.
Fix a transient spec failure
Adds hoverstates for collapsed Issue/Merge Request sidebar
Moved groups above projects
Add StackProf to the Gemfile, along with a utility to get a profile for a spec
Update Sidekiq-cron to fix compatibility issues with Sidekiq 4.2.1
Add a CHANGELOG entry
Alert user when logged in user email is not the same as the invitation
Expose timestamp in build entity used by serializer
Rename `MergeRequest#pipeline` to `head_pipeline`
Remove unnecessary database indexes
CE-specific changes gitlab-org/gitlab-ee#1137
Fixing typo & Clarifying Key name
fix started_at check
fix blob controller spec failure - updated not to use file-path-
fix blob controller spec failure
Merge branch 'jej-use-issuable-finder-instead-of-access-check' into 'security'
...
Conflicts:
app/controllers/projects/merge_requests_controller.rb
lib/api/merge_requests.rb
spec/requests/api/merge_requests_spec.rb
Diffstat (limited to 'doc/api/merge_requests.md')
-rw-r--r-- | doc/api/merge_requests.md | 43 |
1 files changed, 13 insertions, 30 deletions
diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 1d1d646138c..9460b3f73b1 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -338,9 +338,6 @@ Parameters: } ``` -If the operation is successful, 200 and the newly created merge request is returned. -If an error occurs, an error number and a message explaining the reason is returned. - ## Update MR Updates an existing merge request. You can change the target branch, title, or even close the MR. @@ -415,14 +412,9 @@ Parameters: } ``` -If the operation is successful, 200 and the updated merge request is returned. -If an error occurs, an error number and a message explaining the reason is returned. - ## Delete a merge request Only for admins and project owners. Soft deletes the merge request in question. -If the operation is successful, a status code `200` is returned. In case you cannot -destroy this merge request, or it is not present, code `404` is given. ``` DELETE /projects/:id/merge_requests/:merge_request_id @@ -441,15 +433,14 @@ curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://git Merge changes submitted with MR using this API. -If the merge succeeds you'll get a `200 OK`. -If it has some conflicts and can not be merged - you'll get a 405 and the error message 'Branch cannot be merged' +If it has some conflicts and can not be merged - you'll get a `405` and the error message 'Branch cannot be merged' -If merge request is already merged or closed - you'll get a 406 and the error message 'Method Not Allowed' +If merge request is already merged or closed - you'll get a `406` and the error message 'Method Not Allowed' -If the `sha` parameter is passed and does not match the HEAD of the source - you'll get a 409 and the error message 'SHA does not match HEAD of source branch' +If the `sha` parameter is passed and does not match the HEAD of the source - you'll get a `409` and the error message 'SHA does not match HEAD of source branch' -If you don't have permissions to accept this merge request - you'll get a 401 +If you don't have permissions to accept this merge request - you'll get a `401` ``` PUT /projects/:id/merge_requests/:merge_request_id/merge @@ -521,13 +512,11 @@ Parameters: ## Cancel Merge When Pipeline Succeeds -If successful you'll get `200 OK`. +If you don't have permissions to accept this merge request - you'll get a `401` -If you don't have permissions to accept this merge request - you'll get a 401 +If the merge request is already merged or closed - you get `405` and error message 'Method Not Allowed' -If the merge request is already merged or closed - you get 405 and error message 'Method Not Allowed' - -In case the merge request is not set to be merged when the build succeeds, you'll also get a 406 error. +In case the merge request is not set to be merged when the build succeeds, you'll also get a `406` error. ``` PUT /projects/:id/merge_requests/:merge_request_id/cancel_merge_when_build_succeeds ``` @@ -671,11 +660,8 @@ Example response when an external issue tracker (e.g. JIRA) is used: ## Subscribe to a merge request -Subscribes the authenticated user to a merge request to receive notification. If -the operation is successful, status code `201` together with the updated merge -request is returned. If the user is already subscribed to the merge request, the -status code `304` is returned. If the project or merge request is not found, -status code `404` is returned. +Subscribes the authenticated user to a merge request to receive notification. If the user is already subscribed to the merge request, the +status code `304` is returned. ``` POST /projects/:id/merge_requests/:merge_request_id/subscription @@ -748,10 +734,8 @@ Example response: ## Unsubscribe from a merge request Unsubscribes the authenticated user from a merge request to not receive -notifications from that merge request. If the operation is successful, status -code `200` together with the updated merge request is returned. If the user is -not subscribed to the merge request, the status code `304` is returned. If the -project or merge request is not found, status code `404` is returned. +notifications from that merge request. If the user is +not subscribed to the merge request, the status code `304` is returned. ``` DELETE /projects/:id/merge_requests/:merge_request_id/subscription @@ -823,9 +807,8 @@ Example response: ## Create a todo -Manually creates a todo for the current user on a merge request. If the -request is successful, status code `200` together with the created todo is -returned. If there already exists a todo for the user on that merge request, +Manually creates a todo for the current user on a merge request. +If there already exists a todo for the user on that merge request, status code `304` is returned. ``` |