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>
pull/9035/head
Gabriele Pongelli 2024-10-17 21:11:29 +02:00 committed by GitHub
parent a894f8e7eb
commit 12fa2452d8
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()