diff options
author | Rémy Coutable <remy@rymai.me> | 2016-02-11 20:13:36 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-02-11 20:13:36 +0300 |
commit | 973a7d040e9dc39fba69015df0123619d3931093 (patch) | |
tree | a21ddfe66a94a79bf01a62b03c8d98862e8f45e3 /doc/api/merge_requests.md | |
parent | 9b1dfd3e81855c99b0ccb703d3aecc3f1a7ac7c9 (diff) | |
parent | b91d1890a8f33566d52c653e9ae083a3a3329590 (diff) |
Merge branch 'Schniz/gitlab-ce-feature/merge-request-closes-issues-in-api' into 'master'
Add merge_requests/:merge_request_id/closes_issues
_Originally opened at !2660 by @Schniz._
- - -
Added `/api/v3/projects/:id/merge_requests/:merge_request_id/closes_issues` route in the API for getting the issues that should be closed when a merge request merged successfully
See merge request !2779
Diffstat (limited to 'doc/api/merge_requests.md')
-rw-r--r-- | doc/api/merge_requests.md | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index b4dca6dd35e..29446ea73eb 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -516,3 +516,65 @@ Parameters: ## Comments on merge requets Comments are done via the [notes](notes.md) resource. + +## List issues that will close on merge + +Get all the issues that would be closed by merging the provided merge request. + +``` +GET /projects/:id/merge_requests/:merge_request_id/closes_issues +``` + +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `id` | integer | yes | The ID of a project | +| `merge_request_id` | integer | yes | The ID of the merge request | + +```bash +curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/76/merge_requests/1/closes_issues +``` + +Example response: + +```json +[ + { + "state" : "opened", + "description" : "Ratione dolores corrupti mollitia soluta quia.", + "author" : { + "state" : "active", + "id" : 18, + "web_url" : "https://gitlab.example.com/u/eileen.lowe", + "name" : "Alexandra Bashirian", + "avatar_url" : null, + "username" : "eileen.lowe" + }, + "milestone" : { + "project_id" : 1, + "description" : "Ducimus nam enim ex consequatur cumque ratione.", + "state" : "closed", + "due_date" : null, + "iid" : 2, + "created_at" : "2016-01-04T15:31:39.996Z", + "title" : "v4.0", + "id" : 17, + "updated_at" : "2016-01-04T15:31:39.996Z" + }, + "project_id" : 1, + "assignee" : { + "state" : "active", + "id" : 1, + "name" : "Administrator", + "web_url" : "https://gitlab.example.com/u/root", + "avatar_url" : null, + "username" : "root" + }, + "updated_at" : "2016-01-04T15:31:51.081Z", + "id" : 76, + "title" : "Consequatur vero maxime deserunt laboriosam est voluptas dolorem.", + "created_at" : "2016-01-04T15:31:51.081Z", + "iid" : 6, + "labels" : [] + }, +] +``` |