diff options
author | Luis Alonso Chavez Armendariz <lchavez@nearsoft.com> | 2016-11-24 10:28:52 -0700 |
---|---|---|
committer | Luis Alonso Chavez Armendariz <lchavez@nearsoft.com> | 2016-11-24 10:28:52 -0700 |
commit | ed61d44e1edfd41c36ec9085aa95f470bb5699fa (patch) | |
tree | fa1e469baab4423875bbe38b23d84517e25fd547 /doc/api/merge_requests.md | |
parent | 843ae9b26e6d307c6b2e140e904b77565a649674 (diff) | |
download | gitlab-ce-ed61d44e1edfd41c36ec9085aa95f470bb5699fa.tar.gz |
Remove unnecessary sentences for status codes in the API documentation
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 f4167403c2c..1df661369a4 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -337,9 +337,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. @@ -414,14 +411,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 @@ -440,15 +432,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 @@ -520,13 +511,11 @@ Parameters: ## Cancel Merge When Build 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 ``` @@ -670,11 +659,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 @@ -747,10 +733,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 @@ -822,9 +806,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. ``` |