-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Be more lenient with label colors #17752
Conversation
Cool, since the code becomes more complex, I think it's better to have some unit tests for the color string parser. |
Makes sense to me, will try and write those tomorrow 👍🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One tiny nitpick, otherwise LG-TM :)
Thanks for this PR
3dc4399
to
77a2362
Compare
Hey, sorry for taking so long to get back to this. cc @Gusted @techknowlogick if you are cool with the latest version, this should be ready for merge. |
77a2362
to
df71d03
Compare
(Had to update tests during rebase, added a few extra cases to make sure this works right.) |
* giteaofficial/main: (28 commits) Added auto-save whitespace behavior if it changed manually (go-gitea#15566) Support custom ACME provider (go-gitea#18340) Refactor i18n, use Locale to provide i18n/translation related functions (go-gitea#18648) Only request write when necessary (go-gitea#18657) [skip ci] Updated translations via Crowdin Add separate SSH_USER config option (go-gitea#17584) Be more lenient with label colors (go-gitea#17752) remove redundant call to UpdateRepoStats during migration (go-gitea#18591) more repo dump/restore tests, including pull requests (go-gitea#18621) No longer show the db-downgrade SQL in production (go-gitea#18653) Fix the missing i18n key for update checker (go-gitea#18646) Update gitea-vet (go-gitea#18640) Future proof for 1.18 (go-gitea#18644) Add `contrib/upgrade.sh` (go-gitea#18286) If rendering has failed due to a net.OpError stop rendering (go-gitea#18642) Delete old git.NewCommand() and use it as git.NewCommandContext() (go-gitea#18552) Update JS dependencies (go-gitea#18636) fix commits_list_small.tmpl (go-gitea#18641) Fix `make fmt` and `make fmt-check` (go-gitea#18633) Frontport of changelog for v1.16.1 (go-gitea#18615) ...
Accept 12-bit color specifications.
This was bothering me, so, I fixed it.
Now, the label colour field will accept colours without a leading # (adding it in automatically) and will also accept 3-character shorthands.
Example: entering aBC in the label field will now convert to #aabbcc.