diff options
author | Gal Schlezinger <galstar@spitfire.co.il> | 2016-01-31 12:05:47 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-02-11 11:34:07 +0300 |
commit | 78e36780be31257a59cb3076ba5402e380ca240f (patch) | |
tree | c51ae129173c76bd1e808731f8f63dc9e999ae40 /doc/api | |
parent | bce482a59a235edf1607dab73dff88aba4300012 (diff) |
Added '/api/v3/projects/:id/merge_requests/:merge_request_id/closes_issues' route in the API
Added some documentation for it
Added to changelog
Added curl example and an attribute table
Moved the api route definition from "lib/api/issues.rb" to "lib/api/merge_requests.rb"
Fixed the attributes and changed the documentation to be at "merge_requests.md" too
Changed generic titles to more specific titles
added an underscore
added tests. it depends on a newer version of gitlab-test project
I'm doing a since I need to add a branch to the `gitlab-test` repo
removed the before
using 'iid' instead of 'id' in the description to reference the issues. that makes the tests pass
Removed the 'closes-issues' key from test_env. so it should pass the tests
Moved the two initializations to the describe block
Changed the changelog
Diffstat (limited to 'doc/api')
-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 85ed31320b9..2df244f3935 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -412,3 +412,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" : [] + }, +] +``` |