summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2016-07-12 16:31:55 +0200
committerRobert Schilling <rschilling@student.tugraz.at>2016-07-19 11:11:56 +0200
commit54d26c89f66abb2bfec7403fd6b3ed7700e73766 (patch)
tree7ee19c7d2ea3f2c57f739a3d97dbae04a7daafd0 /doc
parent78cd5b8d0e0a69d7b1681bf98b17ccb7a22dde5f (diff)
downloadgitlab-ce-54d26c89f66abb2bfec7403fd6b3ed7700e73766.tar.gz
API: Expose 'developers_can_push' for branches
Diffstat (limited to 'doc')
-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 abc4732c395..e5a1e12ffb9 100644
--- a/doc/api/branches.md
+++ b/doc/api/branches.md
@@ -23,6 +23,7 @@ Example response:
{
"name": "master",
"protected": true,
+ "developers_can_push": false,
"commit": {
"author_email": "john@example.com",
"author_name": "John Smith",
@@ -64,6 +65,7 @@ Example response:
{
"name": "master",
"protected": true,
+ "developers_can_push": false,
"commit": {
"author_email": "john@example.com",
"author_name": "John Smith",
@@ -91,13 +93,14 @@ 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
+curl -X PUT -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/repository/branches/master/protect?developers_can_push=true
```
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `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 |
Example response:
@@ -117,7 +120,8 @@ Example response:
]
},
"name": "master",
- "protected": true
+ "protected": true,
+ "developers_can_push": true
}
```
@@ -158,7 +162,8 @@ Example response:
]
},
"name": "master",
- "protected": false
+ "protected": false,
+ "developers_can_push": false
}
```
@@ -196,7 +201,8 @@ Example response:
]
},
"name": "newbranch",
- "protected": false
+ "protected": false,
+ "developers_can_push": false
}
```