summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Edwards-Jones <jamedjo@gmail.com>2016-12-13 21:45:09 +0000
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2017-02-09 14:23:49 +0000
commit744df2dca8528a61e47091b2d153f087565f342c (patch)
tree878428e830f628e390f7759b3b1c7be12dc0a151
parent0fddece769352b650c01d3a0920eea05f378b940 (diff)
downloadgitlab-ce-744df2dca8528a61e47091b2d153f087565f342c.tar.gz
Update MergeRequest API state_event option documentationjej-update-mr-state-event-docs
-rw-r--r--doc/api/merge_requests.md9
-rw-r--r--lib/api/merge_requests.rb2
2 files changed, 6 insertions, 5 deletions
diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md
index 1cf7632d60c..6ee377125d6 100644
--- a/doc/api/merge_requests.md
+++ b/doc/api/merge_requests.md
@@ -350,16 +350,17 @@ PUT /projects/:id/merge_requests/:merge_request_id
| --------- | ---- | -------- | ----------- |
| `id` | string | yes | The ID of a project |
| `merge_request_id` | integer | yes | The ID of a merge request |
-| `source_branch` | string | yes | The source branch |
-| `target_branch` | string | yes | The target branch |
-| `title` | string | yes | Title of MR |
+| `target_branch` | string | no | The target branch |
+| `title` | string | no | Title of MR |
| `assignee_id` | integer | no | Assignee user ID |
| `description` | string | no | Description of MR |
-| `target_project_id` | integer | no | The target project (numeric id) |
+| `state_event` | string | no | New state (close/reopen) |
| `labels` | string | no | Labels for MR as a comma-separated list |
| `milestone_id` | integer | no | The ID of a milestone |
| `remove_source_branch` | boolean | no | Flag indicating if a merge request should remove the source branch when merging |
+Must include at least one non-required attribute from above.
+
```json
{
"id": 1,
diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb
index 782147883c8..8e09a6f7354 100644
--- a/lib/api/merge_requests.rb
+++ b/lib/api/merge_requests.rb
@@ -138,7 +138,7 @@ module API
params do
optional :title, type: String, allow_blank: false, desc: 'The title of the merge request'
optional :target_branch, type: String, allow_blank: false, desc: 'The target branch'
- optional :state_event, type: String, values: %w[close reopen merge],
+ optional :state_event, type: String, values: %w[close reopen],
desc: 'Status of the merge request'
use :optional_params
at_least_one_of :title, :target_branch, :description, :assignee_id,