summaryrefslogtreecommitdiff
path: root/doc/api/branches.md
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2016-07-19 10:36:18 +0200
committerRobert Schilling <rschilling@student.tugraz.at>2016-07-19 10:44:52 +0200
commitab9ea51dd2556d8cffe747986162cdf77c52f64d (patch)
treed52eb5b14067406aa7c0eaf40b53f84688192641 /doc/api/branches.md
parent8f4e0d9d55b5d9b01d6c2de00091c68d41e7bf27 (diff)
downloadgitlab-ce-api-dev-can-push.tar.gz
API: Expose 'developers_can_merge' for branchesapi-dev-can-push
Diffstat (limited to 'doc/api/branches.md')
-rw-r--r--doc/api/branches.md14
1 files changed, 10 insertions, 4 deletions
diff --git a/doc/api/branches.md b/doc/api/branches.md
index e5a1e12ffb9..dbe8306c66f 100644
--- a/doc/api/branches.md
+++ b/doc/api/branches.md
@@ -24,6 +24,7 @@ Example response:
"name": "master",
"protected": true,
"developers_can_push": false,
+ "developers_can_merge": false,
"commit": {
"author_email": "john@example.com",
"author_name": "John Smith",
@@ -66,6 +67,7 @@ Example response:
"name": "master",
"protected": true,
"developers_can_push": false,
+ "developers_can_merge": false,
"commit": {
"author_email": "john@example.com",
"author_name": "John Smith",
@@ -93,7 +95,7 @@ PUT /projects/:id/repository/branches/:branch/protect
```
```bash
-curl -X PUT -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/repository/branches/master/protect?developers_can_push=true
+curl -X PUT -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/repository/branches/master/protect?developers_can_push=true&developers_can_merge=true
```
| Attribute | Type | Required | Description |
@@ -101,6 +103,7 @@ curl -X PUT -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/
| `id` | integer | yes | The ID of a project |
| `branch` | string | yes | The name of the branch |
| `developers_can_push` | boolean | no | Flag if developers can push to the branch |
+| `developers_can_merge` | boolean | no | Flag if developers can merge to the branch |
Example response:
@@ -121,7 +124,8 @@ Example response:
},
"name": "master",
"protected": true,
- "developers_can_push": true
+ "developers_can_push": true,
+ "developers_can_merge": true
}
```
@@ -163,7 +167,8 @@ Example response:
},
"name": "master",
"protected": false,
- "developers_can_push": false
+ "developers_can_push": false,
+ "developers_can_merge": false
}
```
@@ -202,7 +207,8 @@ Example response:
},
"name": "newbranch",
"protected": false,
- "developers_can_push": false
+ "developers_can_push": false,
+ "developers_can_merge": false
}
```