[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
patchback[bot] 2024-10-17 21:49:39 +02:00 committed by GitHub
parent 1e78ff58d5
commit 23b646d5c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -0,0 +1,2 @@
bugfixes:
- gitlab_label - update label's color (https://github.com/ansible-collections/community.general/pull/9010).

View File

@ -275,6 +275,8 @@ class GitlabLabels(object):
_label.description = var_obj.get('description')
if var_obj.get('priority') is not None:
_label.priority = var_obj.get('priority')
if var_obj.get('color') is not None:
_label.color = var_obj.get('color')
# save returns None
_label.save()