mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
[gitlab] Fix gitlab constants calls (#7467)
fix: Fix gitlab constants calls Co-authored-by: Arnaud Hatzenbuhler <arnaud.hatzenbuhler@conserto.pro>
This commit is contained in:
parent
6d0bcec1cb
commit
a366318ac6
5 changed files with 23 additions and 18 deletions
5
changelogs/fragments/7467-fix-gitlab-constants-calls.yml
Normal file
5
changelogs/fragments/7467-fix-gitlab-constants-calls.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
bugfixes:
|
||||
- gitlab_group_members - fix gitlab constants call in ``gitlab_group_members`` module (https://github.com/ansible-collections/community.general/issues/7467).
|
||||
- gitlab_project_members - fix gitlab constants call in ``gitlab_project_members`` module (https://github.com/ansible-collections/community.general/issues/7467).
|
||||
- gitlab_protected_branches - fix gitlab constants call in ``gitlab_protected_branches`` module (https://github.com/ansible-collections/community.general/issues/7467).
|
||||
- gitlab_user - fix gitlab constants call in ``gitlab_user`` module (https://github.com/ansible-collections/community.general/issues/7467).
|
|
@ -276,11 +276,11 @@ def main():
|
|||
ensure_gitlab_package(module)
|
||||
|
||||
access_level_int = {
|
||||
'guest': gitlab.GUEST_ACCESS,
|
||||
'reporter': gitlab.REPORTER_ACCESS,
|
||||
'developer': gitlab.DEVELOPER_ACCESS,
|
||||
'maintainer': gitlab.MAINTAINER_ACCESS,
|
||||
'owner': gitlab.OWNER_ACCESS,
|
||||
'guest': gitlab.const.GUEST_ACCESS,
|
||||
'reporter': gitlab.const.REPORTER_ACCESS,
|
||||
'developer': gitlab.const.DEVELOPER_ACCESS,
|
||||
'maintainer': gitlab.const.MAINTAINER_ACCESS,
|
||||
'owner': gitlab.const.OWNER_ACCESS,
|
||||
}
|
||||
|
||||
gitlab_group = module.params['gitlab_group']
|
||||
|
|
|
@ -282,10 +282,10 @@ def main():
|
|||
ensure_gitlab_package(module)
|
||||
|
||||
access_level_int = {
|
||||
'guest': gitlab.GUEST_ACCESS,
|
||||
'reporter': gitlab.REPORTER_ACCESS,
|
||||
'developer': gitlab.DEVELOPER_ACCESS,
|
||||
'maintainer': gitlab.MAINTAINER_ACCESS,
|
||||
'guest': gitlab.const.GUEST_ACCESS,
|
||||
'reporter': gitlab.const.REPORTER_ACCESS,
|
||||
'developer': gitlab.const.DEVELOPER_ACCESS,
|
||||
'maintainer': gitlab.const.MAINTAINER_ACCESS,
|
||||
}
|
||||
|
||||
gitlab_project = module.params['project']
|
||||
|
|
|
@ -94,9 +94,9 @@ class GitlabProtectedBranch(object):
|
|||
self._module = module
|
||||
self.project = self.get_project(project)
|
||||
self.ACCESS_LEVEL = {
|
||||
'nobody': gitlab.NO_ACCESS,
|
||||
'developer': gitlab.DEVELOPER_ACCESS,
|
||||
'maintainer': gitlab.MAINTAINER_ACCESS
|
||||
'nobody': gitlab.const.NO_ACCESS,
|
||||
'developer': gitlab.const.DEVELOPER_ACCESS,
|
||||
'maintainer': gitlab.const.MAINTAINER_ACCESS
|
||||
}
|
||||
|
||||
def get_project(self, project_name):
|
||||
|
|
|
@ -244,12 +244,12 @@ class GitLabUser(object):
|
|||
self._gitlab = gitlab_instance
|
||||
self.user_object = None
|
||||
self.ACCESS_LEVEL = {
|
||||
'guest': gitlab.GUEST_ACCESS,
|
||||
'reporter': gitlab.REPORTER_ACCESS,
|
||||
'developer': gitlab.DEVELOPER_ACCESS,
|
||||
'master': gitlab.MAINTAINER_ACCESS,
|
||||
'maintainer': gitlab.MAINTAINER_ACCESS,
|
||||
'owner': gitlab.OWNER_ACCESS,
|
||||
'guest': gitlab.const.GUEST_ACCESS,
|
||||
'reporter': gitlab.const.REPORTER_ACCESS,
|
||||
'developer': gitlab.const.DEVELOPER_ACCESS,
|
||||
'master': gitlab.const.MAINTAINER_ACCESS,
|
||||
'maintainer': gitlab.const.MAINTAINER_ACCESS,
|
||||
'owner': gitlab.const.OWNER_ACCESS,
|
||||
}
|
||||
|
||||
'''
|
||||
|
|
Loading…
Reference in a new issue