[PR #9010/12fa2452 backport][stable-9] update gitlab label's color (#9034)
update gitlab label's color (#9010)
* update gitlab label's color
fail if both new_name and color are missing, as per Gitlab API docs.
* add changelog
* Update changelog with suggestion
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* remove unneeded check
* Update changelog
---------
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 12fa2452d8
)
Co-authored-by: Gabriele Pongelli <gpongelli@users.noreply.github.com>
pull/9036/head
parent
1e78ff58d5
commit
23b646d5c2
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- gitlab_label - update label's color (https://github.com/ansible-collections/community.general/pull/9010).
|
|
@ -275,6 +275,8 @@ class GitlabLabels(object):
|
||||||
_label.description = var_obj.get('description')
|
_label.description = var_obj.get('description')
|
||||||
if var_obj.get('priority') is not None:
|
if var_obj.get('priority') is not None:
|
||||||
_label.priority = var_obj.get('priority')
|
_label.priority = var_obj.get('priority')
|
||||||
|
if var_obj.get('color') is not None:
|
||||||
|
_label.color = var_obj.get('color')
|
||||||
|
|
||||||
# save returns None
|
# save returns None
|
||||||
_label.save()
|
_label.save()
|
||||||
|
|
Loading…
Reference in New Issue