mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 02:41:25 -07:00
New module: gitlab_label (#7657)
* gitlab project label first commit * fixes from CI run * fixing some sanity test * sanity checks, removing typing * remove default for required field * fix indentation * improving test set * fixes to pass test set * reuse compliancy * fix sanity checks * fix: method returns group, not project * refactor: start adding group, test still pass * updated module and tests to handle group labels * update name to remove 'project' * removing default * typo * generic name for returned dict * returns also label object from library invocation * remove unused var, updated doc * fix output object name * version_added Co-authored-by: Felix Fontein <felix@fontein.de> * Remove python 2.7 Co-authored-by: Felix Fontein <felix@fontein.de> * Missing dot Co-authored-by: Felix Fontein <felix@fontein.de> * Remove version_added Co-authored-by: Felix Fontein <felix@fontein.de> * Remove useless doc Co-authored-by: Felix Fontein <felix@fontein.de> * Color is a string * Fixes from recent PR comments. --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
4298f2dd92
commit
5c72ab34bf
7 changed files with 1009 additions and 2 deletions
|
@ -59,11 +59,11 @@ def find_project(gitlab_instance, identifier):
|
|||
|
||||
def find_group(gitlab_instance, identifier):
|
||||
try:
|
||||
project = gitlab_instance.groups.get(identifier)
|
||||
group = gitlab_instance.groups.get(identifier)
|
||||
except Exception as e:
|
||||
return None
|
||||
|
||||
return project
|
||||
return group
|
||||
|
||||
|
||||
def ensure_gitlab_package(module):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue