diff options
author | Rémy Coutable <remy@rymai.me> | 2017-11-07 10:58:03 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-11-07 10:58:03 +0000 |
commit | 2ec5ae21b8ab16bea83c4b00df5bf17be8ad34c6 (patch) | |
tree | 11ceb1f9c163dd43a238b49696df4918a04519fb /doc | |
parent | ce7e60f6d77f4c7ad78ec97f3d5b8dcc9b12c03d (diff) | |
parent | 9d259c2232a7a6bab344b961ef8dc9561c380c29 (diff) | |
download | gitlab-ce-2ec5ae21b8ab16bea83c4b00df5bf17be8ad34c6.tar.gz |
Merge branch 'add-changes-count-to-merge-requests-api' into 'master'
Add changes_count to the merge requests API
See merge request gitlab-org/gitlab-ce!15178
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/merge_requests.md | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 50a971102fb..6de460f2778 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -15,6 +15,11 @@ given state (`opened`, `closed`, or `merged`) or all of them (`all`). The pagination parameters `page` and `per_page` can be used to restrict the list of merge requests. +**Note**: the `changes_count` value in the response is a string, not an +integer. This is because when an MR has too many changes to display and store, +it will be capped at 1,000. In that case, the API will return the string +`"1000+"` for the changes count. + ``` GET /merge_requests GET /merge_requests?state=opened @@ -92,6 +97,7 @@ Parameters: "sha": "8888888888888888888888888888888888888888", "merge_commit_sha": null, "user_notes_count": 1, + "changes_count": "1", "should_remove_source_branch": true, "force_remove_source_branch": false, "web_url": "http://example.com/example/example/merge_requests/1", @@ -130,6 +136,11 @@ will be the same. In the case of a merge request from a fork, `target_project_id` and `project_id` will be the same and `source_project_id` will be the fork project's ID. +**Note**: the `changes_count` value in the response is a string, not an +integer. This is because when an MR has too many changes to display and store, +it will be capped at 1,000. In that case, the API will return the string +`"1000+"` for the changes count. + Parameters: | Attribute | Type | Required | Description | @@ -198,6 +209,7 @@ Parameters: "sha": "8888888888888888888888888888888888888888", "merge_commit_sha": null, "user_notes_count": 1, + "changes_count": "1", "should_remove_source_branch": true, "force_remove_source_branch": false, "web_url": "http://example.com/example/example/merge_requests/1", @@ -274,6 +286,7 @@ Parameters: "sha": "8888888888888888888888888888888888888888", "merge_commit_sha": "9999999999999999999999999999999999999999", "user_notes_count": 1, + "changes_count": "1", "should_remove_source_branch": true, "force_remove_source_branch": false, "web_url": "http://example.com/example/example/merge_requests/1", @@ -386,6 +399,7 @@ Parameters: "sha": "8888888888888888888888888888888888888888", "merge_commit_sha": null, "user_notes_count": 1, + "changes_count": "1", "should_remove_source_branch": true, "force_remove_source_branch": false, "web_url": "http://example.com/example/example/merge_requests/1", @@ -480,6 +494,7 @@ POST /projects/:id/merge_requests "sha": "8888888888888888888888888888888888888888", "merge_commit_sha": null, "user_notes_count": 0, + "changes_count": "1", "should_remove_source_branch": true, "force_remove_source_branch": false, "web_url": "http://example.com/example/example/merge_requests/1", @@ -565,6 +580,7 @@ Must include at least one non-required attribute from above. "sha": "8888888888888888888888888888888888888888", "merge_commit_sha": null, "user_notes_count": 1, + "changes_count": "1", "should_remove_source_branch": true, "force_remove_source_branch": false, "web_url": "http://example.com/example/example/merge_requests/1", @@ -670,6 +686,7 @@ Parameters: "sha": "8888888888888888888888888888888888888888", "merge_commit_sha": "9999999999999999999999999999999999999999", "user_notes_count": 1, + "changes_count": "1", "should_remove_source_branch": true, "force_remove_source_branch": false, "web_url": "http://example.com/example/example/merge_requests/1", @@ -747,6 +764,7 @@ Parameters: "sha": "8888888888888888888888888888888888888888", "merge_commit_sha": null, "user_notes_count": 1, + "changes_count": "1", "should_remove_source_branch": true, "force_remove_source_branch": false, "web_url": "http://example.com/example/example/merge_requests/1", @@ -822,7 +840,8 @@ Example response when the GitLab issue tracker is used: "created_at" : "2016-01-04T15:31:51.081Z", "iid" : 6, "labels" : [], - "user_notes_count": 1 + "user_notes_count": 1, + "changes_count": "1" }, ] ``` @@ -1077,6 +1096,7 @@ Example response: "sha": "8888888888888888888888888888888888888888", "merge_commit_sha": null, "user_notes_count": 7, + "changes_count": "1", "should_remove_source_branch": true, "force_remove_source_branch": false, "web_url": "http://example.com/example/example/merge_requests/1" |