swingbit / jira2gitlab

Migrate Jira projects into a Gitlab instance
MIT License
20 stars 11 forks source link

Add possibility to configure label colors #20

Closed mirjan-hoffmann closed 1 year ago

mirjan-hoffmann commented 1 year ago

Ref https://github.com/swingbit/jira2gitlab/issues/19

swingbit commented 1 year ago

@mirjan-hoffmann good idea. I don't have time to test it now, but if you have and it works, then I'll trust it.

mirjan-hoffmann commented 1 year ago

Thanks for your quick response.

I tested it with an instance of GitLab Community Edition and it works.

Default value is no color-update (LABEL_COLORS = {})

If I configure the colors in the config (see example in the comment in the config), then the colors are updated as expected

for key, value in ISSUE_COMPONENT_MAP.items():
    LABEL_COLORS[value] = '#e6e6fa'
for key, value in ISSUE_PRIORITY_MAP.items():
    LABEL_COLORS[value] = '#8fbc8f'

-> all labels from ISSUE_COMPONENT_MAP have color #e6e6fa and all labels from ISSUE_PRIORITY_MAP have color #8fbc8f