summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Bajao <ebajao@gitlab.com>2019-08-30 14:35:13 +0800
committerPatrick Bajao <ebajao@gitlab.com>2019-08-30 14:45:11 +0800
commit70be63f936b01f4ae2f5e7deaadbc51ac082d90c (patch)
tree524c879e6776115611d4f0a24a15a4fcabfaffeb
parent32900bbfc440b9948f8ac26c04f254b9619769d4 (diff)
downloadgitlab-ce-70be63f936b01f4ae2f5e7deaadbc51ac082d90c.tar.gz
Doc: Fix order of sections12055-public-mr-approval-rules-api-ce
-rw-r--r--doc/api/merge_request_approvals.md162
1 files changed, 81 insertions, 81 deletions
diff --git a/doc/api/merge_request_approvals.md b/doc/api/merge_request_approvals.md
index 7dae1b25658..b73fe38f53e 100644
--- a/doc/api/merge_request_approvals.md
+++ b/doc/api/merge_request_approvals.md
@@ -525,87 +525,6 @@ PUT /projects/:id/merge_requests/:merge_request_iid/approvers
}
```
-## Approve Merge Request
-
->**Note:** This API endpoint is only available on 8.9 Starter and above.
-
-If you are allowed to, you can approve a merge request using the following
-endpoint:
-
-```
-POST /projects/:id/merge_requests/:merge_request_iid/approve
-```
-
-**Parameters:**
-
-| Attribute | Type | Required | Description |
-|---------------------|---------|----------|-------------------------|
-| `id` | integer | yes | The ID of a project |
-| `merge_request_iid` | integer | yes | The IID of MR |
-| `sha` | string | no | The HEAD of the MR |
-| `approval_password` **(STARTER)** | string | no | Current user's password. Required if [**Require user password to approve**](../user/project/merge_requests/merge_request_approvals.md#require-authentication-when-approving-a-merge-request-starter) is enabled in the project settings. |
-
-The `sha` parameter works in the same way as
-when [accepting a merge request](merge_requests.md#accept-mr): if it is passed, then it must
-match the current HEAD of the merge request for the approval to be added. If it
-does not match, the response code will be `409`.
-
-```json
-{
- "id": 5,
- "iid": 5,
- "project_id": 1,
- "title": "Approvals API",
- "description": "Test",
- "state": "opened",
- "created_at": "2016-06-08T00:19:52.638Z",
- "updated_at": "2016-06-09T21:32:14.105Z",
- "merge_status": "can_be_merged",
- "approvals_required": 2,
- "approvals_left": 0,
- "approved_by": [
- {
- "user": {
- "name": "Administrator",
- "username": "root",
- "id": 1,
- "state": "active",
- "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon",
- "web_url": "http://localhost:3000/root"
- }
- },
- {
- "user": {
- "name": "Nico Cartwright",
- "username": "ryley",
- "id": 2,
- "state": "active",
- "avatar_url": "http://www.gravatar.com/avatar/cf7ad14b34162a76d593e3affca2adca?s=80\u0026d=identicon",
- "web_url": "http://localhost:3000/ryley"
- }
- }
- ],
-}
-```
-
-## Unapprove Merge Request
-
->**Note:** This API endpoint is only available on 9.0 Starter and above.
-
-If you did approve a merge request, you can unapprove it using the following
-endpoint:
-
-```
-POST /projects/:id/merge_requests/:merge_request_iid/unapprove
-```
-
-**Parameters:**
-
-| Attribute | Type | Required | Description |
-|---------------------|---------|----------|---------------------|
-| `id` | integer | yes | The ID of a project |
-| `merge_request_iid` | integer | yes | The IID of MR |
-
### Get merge request level rules
>**Note:** This API endpoint is only available on 12.3 Starter and above.
@@ -869,3 +788,84 @@ These are system generated rules.
| `id` | integer | yes | The ID of a project |
| `merge_request_iid` | integer | yes | The ID of MR |
| `approval_rule_id` | integer | yes | The ID of a approval rule |
+
+## Approve Merge Request
+
+>**Note:** This API endpoint is only available on 8.9 Starter and above.
+
+If you are allowed to, you can approve a merge request using the following
+endpoint:
+
+```
+POST /projects/:id/merge_requests/:merge_request_iid/approve
+```
+
+**Parameters:**
+
+| Attribute | Type | Required | Description |
+|---------------------|---------|----------|-------------------------|
+| `id` | integer | yes | The ID of a project |
+| `merge_request_iid` | integer | yes | The IID of MR |
+| `sha` | string | no | The HEAD of the MR |
+| `approval_password` **(STARTER)** | string | no | Current user's password. Required if [**Require user password to approve**](../user/project/merge_requests/merge_request_approvals.md#require-authentication-when-approving-a-merge-request-starter) is enabled in the project settings. |
+
+The `sha` parameter works in the same way as
+when [accepting a merge request](merge_requests.md#accept-mr): if it is passed, then it must
+match the current HEAD of the merge request for the approval to be added. If it
+does not match, the response code will be `409`.
+
+```json
+{
+ "id": 5,
+ "iid": 5,
+ "project_id": 1,
+ "title": "Approvals API",
+ "description": "Test",
+ "state": "opened",
+ "created_at": "2016-06-08T00:19:52.638Z",
+ "updated_at": "2016-06-09T21:32:14.105Z",
+ "merge_status": "can_be_merged",
+ "approvals_required": 2,
+ "approvals_left": 0,
+ "approved_by": [
+ {
+ "user": {
+ "name": "Administrator",
+ "username": "root",
+ "id": 1,
+ "state": "active",
+ "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon",
+ "web_url": "http://localhost:3000/root"
+ }
+ },
+ {
+ "user": {
+ "name": "Nico Cartwright",
+ "username": "ryley",
+ "id": 2,
+ "state": "active",
+ "avatar_url": "http://www.gravatar.com/avatar/cf7ad14b34162a76d593e3affca2adca?s=80\u0026d=identicon",
+ "web_url": "http://localhost:3000/ryley"
+ }
+ }
+ ],
+}
+```
+
+## Unapprove Merge Request
+
+>**Note:** This API endpoint is only available on 9.0 Starter and above.
+
+If you did approve a merge request, you can unapprove it using the following
+endpoint:
+
+```
+POST /projects/:id/merge_requests/:merge_request_iid/unapprove
+```
+
+**Parameters:**
+
+| Attribute | Type | Required | Description |
+|---------------------|---------|----------|---------------------|
+| `id` | integer | yes | The ID of a project |
+| `merge_request_iid` | integer | yes | The IID of MR |