Skip to content

fix: preserve label colors when updating issue labels#727

Merged
dlvhdr merged 1 commit intodlvhdr:mainfrom
majiayu000:fix-721-bug-labels-have-wrong-color-af-0102-0950
Jan 2, 2026
Merged

fix: preserve label colors when updating issue labels#727
dlvhdr merged 1 commit intodlvhdr:mainfrom
majiayu000:fix-721-bug-labels-have-wrong-color-af-0102-0950

Conversation

@majiayu000
Copy link
Contributor

Fixes #721

Changes

  • Create a map to store existing label colors before the gh CLI update
  • Use the stored colors when building the returned labels after update

When editing labels on an issue, the label colors were lost because
the returned labels only included the name but not the color. This
fix creates a map of existing label colors and uses it when
constructing the returned labels to preserve colors for labels that
already existed on the issue.

Fixes dlvhdr#721

Signed-off-by: majiayu000 <1835304752@qq.com>
Copy link
Owner

@dlvhdr dlvhdr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks that's great! What we really need to do is fetch the labels again though since the new labels won't have color :(

@dlvhdr dlvhdr merged commit 8ae986b into dlvhdr:main Jan 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Labels have wrong color after submitting

2 participants