Project 'gitlab-org/gitlab-ce' was moved to 'gitlab-org/gitlab-foss'. Please update any links and bookmarks that may still have the old path.
Add support for new protected branches features on the Branch API
Zendesk issue: https://gitlab.zendesk.com/agent/tickets/40761
The current RepoBranch entity in the API exposes the boolean for whether developers can push or merge, but doesn't include the more granular details of the new EE protected branch feature. It should be possible to see whether masters can push or merge and specific people, as well.
https://docs.gitlab.com/ee/api/branches.html#list-repository-branches
Specification
-
GET /projects/:id/repository/branches
andGET /projects/:id/repository/branches/:branch
should return additional information- Can masters push?
- Can masters merge?
- List of specific users who can push
- List of specific users who can merge?
That might look like
[
{
"name": "master",
"protected": true,
"developers_can_push": false,
"developers_can_merge": false,
"masters_can_push": false,
"masters_can_merge": false,
"users_with_push_rights": [{
...
}],
"users_with_merge_rights": [{
...
}],
"commit": {
...
}
},
...
]
- Ability to update those protection settings