8000 Protected Environments not supported · Issue #1130 · python-gitlab/python-gitlab · GitHub
[go: up one dir, main page]

Skip to content< 8000 /a>
Protected Environments not supported #1130
Closed
@nastrofaction

Description

@nastrofaction

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    EEIssues related to the enterprise version of GitLabhelp wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0