- Notifications
You must be signed in to change notification settings - Fork675
Closed
Description
Description of the problem, including code/CLI snippet
Per API:https://docs.gitlab.com/ee/api/protected_environments.html we should be able to create protected environment but the code fails as it isn't supported
Expected Behavior
project.protectedenvironments.create({ 'name': env, 'deploy_access_levels': [{"access_level": gitlab.MAINTAINER_ACCESS}] })should create the protected environment
Actual Behavior
Doesn't work
Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/gitlab/base.py", line 59, in __getattr__ return self.__dict__["_updated_attrs"][name]KeyError: 'protectedenvironments'During handling of the above exception, another exception occurred:Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/gitlab/base.py", line 62, in __getattr__ value = self.__dict__["_attrs"][name]KeyError: 'protectedenvironments'During handling of the above exception, another exception occurred:Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/gitlab/base.py", line 82, in __getattr__ return self.__dict__["_parent_attrs"][name]KeyError: 'protectedenvironments'Specifications
- python-gitlab version: python-gitlab-2.3.1
- API version you are using (v3/v4): v4
- Gitlab server version (or gitlab.com): gitlab.com