Closed
Description
Group Protected Branches
Feature Request to create the protected_branches
attr for the Group class.
The ability exists over API to query this: (docs)
curl --header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/groups/5/protected_branches"
e.g.
>>> group = gl.groups.get('56')
>>> pb = group.protectedbranches.list(get_all=True)
>>> pb
[
{
"id": 1,
"name": "main",
"push_access_levels": [
{
"id": 1,
"access_level": 40,
"user_id": null,
"group_id": 1234,
"access_level_description": "Maintainers"
}
],
"merge_access_levels": [
{
"id": 1,
...
ref: https://gitlab.com/gitlab-security-oss/cis/gitlabcis/-/issues/125
Specifications
- python-gitlab version:
5.6.0
- Gitlab server version (or gitlab.com):
GitLab Enterprise Edition 17.11.0-pre
76ac92593a5
Metadata
Metadata
Assignees
Labels
No labels