Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-11-22 09:02:58 +0300
committerNick Thomas <nick@gitlab.com>2018-11-27 21:04:33 +0300
commit9f287298270b3a833bc53b9280c6e3c6a2f055b8 (patch)
tree3283dc7f49b6ec62f23e89f1811a539b21461b82 /doc
parent0afce35d65aa433d221e41632c6d8095ab68c39f (diff)
Add a rebase API endpoint for merge requests
Diffstat (limited to 'doc')
-rw-r--r--doc/api/merge_requests.md25
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.