Skip to content

Conversation

zampierilucas
Copy link
Collaborator

@zampierilucas zampierilucas commented Feb 16, 2024

This takes the label.Color hex and converts it to color in HexToRGB in utils, then uses is to set the background color.

Closes: #887

This takes the label.color hex and converts it to color in HexToRGB in
utils, then uses rgbterm lib to convert rgb to terminal color.

Signed-off-by: Lucas Zampieri <lzampier@redhat.com>
@zampierilucas
Copy link
Collaborator Author

This is what the labels look like with the change.
image

@teto
Copy link

teto commented Feb 20, 2024

as a go noob , I was not able to run the PR from the folder via MYGITLABREPO $ go run ~/lab/main.go -- label list because it couldn't find the go modules so I tried go build -o toto -mod=readonly but it asked for a go mod tidy ? after that I was able to run ~/lab/toto label list and it worked beautifully ty.

@prarit
Copy link
Collaborator

prarit commented Feb 20, 2024

I like this change but I think it should be optional. @zampierilucas I think you should add a config option for this to enable the colors. That way users can set it in their lab.toml and not worry about it.

Label colored printing can be enabled by the --color param, or by using
the config file.

Signed-off-by: Lucas Zampieri <lzampier@redhat.com>
@zampierilucas
Copy link
Collaborator Author

@prarit I've updated my mr with you suggestion.

title

Signed-off-by: Lucas Zampieri <lzampier@redhat.com>
Copy link
Collaborator

@bmeneg bmeneg left a comment

Choose a reason for hiding this comment

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

We can make this change generic to every lab command.
Since it's a bigger change, this one is fine wrt the request.

@teto
Copy link

teto commented Aug 27, 2024

was the CI failure linked to this PR ? else maybe it's mergeable ?

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.

show label colors in terminal

4 participants