ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
833 stars 1.53k forks source link

community.general.gitlab_label does not update colors for existing labels #8991

Closed silvermind closed 1 month ago

silvermind commented 1 month ago

Summary

When I try to update an existing gitlab label the change of a color is detected but not applied

Issue Type

Bug Report

Component Name

community.general.gitlab_label

Ansible Version

$ ansible --version
ansible [core 2.17.2]

Community.general Version

$ ansible-galaxy collection list community.general
community.general 9.4.0

Configuration

$ ansible-config dump --only-changed
CONFIG_FILE() = None
PAGER(env: PAGER) = less

OS / Environment

Ubuntu 22 in WSL

Steps to Reproduce

- name: Set or update some labels
  community.general.gitlab_label:
    api_url: https://gitlab.com
    api_token: secret_access_token
    project: "group1/project1"
    labels:
      - name: label_one
        color: "#224488"
    state: present

Expected Results

if the label already exist it should have the color 224488

Actual Results

label color does not change

assuming this is due to color is missing in the update_label method found at https://github.com/ansible-collections/community.general/blob/main/plugins/modules/gitlab_label.py#L266

Code of Conduct

ansibullbot commented 1 month ago

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot commented 1 month ago

cc @Lunik @Shaps @gpongelli @lgatellier @marwatk @metanovii @nejch @scodeman @sh0shin @suukit @waheedi @zanssa click here for bot help

gpongelli commented 1 month ago

Hi @silvermind , thanks, I've just pushed a PR to fix this bug.