diff options
author | Nick Thomas <nick@gitlab.com> | 2018-11-22 06:02:58 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-11-27 18:04:33 +0000 |
commit | 9f287298270b3a833bc53b9280c6e3c6a2f055b8 (patch) | |
tree | 3283dc7f49b6ec62f23e89f1811a539b21461b82 /doc/api/merge_requests.md | |
parent | 0afce35d65aa433d221e41632c6d8095ab68c39f (diff) | |
download | gitlab-ce-9f287298270b3a833bc53b9280c6e3c6a2f055b8.tar.gz |
Add a rebase API endpoint for merge requests
Diffstat (limited to 'doc/api/merge_requests.md')
-rw-r--r-- | doc/api/merge_requests.md | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index da70c74c4ce..2f5b1608882 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -1206,6 +1206,31 @@ Parameters: } ``` +## Rebase a merge request + +Automatically rebase the `source_branch` of the merge request against its +`target_branch`. + +If you don't have permissions to push to the merge request's source branch - +you'll get a `403 Forbidden` response. + +``` +PUT /projects/:id/merge_requests/:merge_request_iid/rebase +``` + +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | +| `merge_request_iid` | integer | yes | The internal ID of the merge request | + +```bash +curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/76/merge_requests/1/rebase +``` + +This is an asynchronous request. The API will return an empty `202 Accepted` +response if the request is enqueued successfully. You should poll the +[Get single MR](#get-single-mr) endpoint to determine success or failure. + ## Comments on merge requests Comments are done via the [notes](notes.md) resource. |