Skip to content
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

Label color parsing fails with scientific notation hex values #707

Open
PendaGTP opened this issue Dec 11, 2024 · 0 comments · May be fixed by #708
Open

Label color parsing fails with scientific notation hex values #707

PendaGTP opened this issue Dec 11, 2024 · 0 comments · May be fixed by #708
Labels
bug Something isn't working

Comments

@PendaGTP
Copy link

Problem Description

When label colors are specified without quotes in the YAML they could be interpreted as scientific notation (e.g. 5319e7), they are incorrectly converted to decimal number

labels:
  - name: "example"
    color: 5319e7  # 53190000000 instead of 5319e7

GitHub API return status code 422 since value is not a valid.

What is actually happening

The label creation/update fails

What is the expected behavior

Unquoted color values should be preserved as hex colors rather than being converted to decimal notation

Error output, if available

{
  "message": "Validation Failed",
  "errors": [{ "resource": "Label", "code": "invalid", "field": "color" }]
}
@PendaGTP PendaGTP added the bug Something isn't working label Dec 11, 2024
@PendaGTP PendaGTP linked a pull request Dec 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant