Open
Description
Protected Environments at the Group level
Feature Request to create the group level protected environments list on the Group class.
The ability exists over API to query this:
curl --header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/groups/:id/protected_environments"
[
{
"name": "development",
"deploy_access_levels": [
{
"id": 1234567,
"access_level": 40,
"access_level_description": "Maintainers",
"user_id": null,
"group_id": null,
"group_inheritance_type": 0
}
],
"required_approval_count": 0,
"approval_rules": []
}
]
...
e.g.
>>> group = gl.groups.get('56')
>>> pe = group.protected_environments.list(get_all=False)
>>> from pprint import pprint
>>> for e in pe):
>>> pprint(e)
{
"name": "development",
"deploy_access_levels": [
{
"id": 1234567,
"access_level": 40,
"access_level_description": "Maintainers",
"user_id": null,
"group_id": null,
"group_inheritance_type": 0
}
],
"required_approval_count": 0,
"approval_rules": []
}
...
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