Commit 744df2dc authored by James Edwards-Jones's avatar James Edwards-Jones Committed by James Edwards-Jones

Update MergeRequest API state_event option documentation

parent 0fddece7
...@@ -350,16 +350,17 @@ PUT /projects/:id/merge_requests/:merge_request_id ...@@ -350,16 +350,17 @@ PUT /projects/:id/merge_requests/:merge_request_id
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | string | yes | The ID of a project | | `id` | string | yes | The ID of a project |
| `merge_request_id` | integer | yes | The ID of a merge request | | `merge_request_id` | integer | yes | The ID of a merge request |
| `source_branch` | string | yes | The source branch | | `target_branch` | string | no | The target branch |
| `target_branch` | string | yes | The target branch | | `title` | string | no | Title of MR |
| `title` | string | yes | Title of MR |
| `assignee_id` | integer | no | Assignee user ID | | `assignee_id` | integer | no | Assignee user ID |
| `description` | string | no | Description of MR | | `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 | | `labels` | string | no | Labels for MR as a comma-separated list |
| `milestone_id` | integer | no | The ID of a milestone | | `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 | | `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 ```json
{ {
"id": 1, "id": 1,
......
...@@ -138,7 +138,7 @@ module API ...@@ -138,7 +138,7 @@ module API
params do params do
optional :title, type: String, allow_blank: false, desc: 'The title of the merge request' 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 :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' desc: 'Status of the merge request'
use :optional_params use :optional_params
at_least_one_of :title, :target_branch, :description, :assignee_id, at_least_one_of :title, :target_branch, :description, :assignee_id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment