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

[API] Inconsistent Label Format #10127

Closed
6543 opened this issue Feb 3, 2020 · 4 comments · Fixed by #10129
Closed

[API] Inconsistent Label Format #10127

6543 opened this issue Feb 3, 2020 · 4 comments · Fixed by #10129
Labels
type/enhancement An improvement of existing functionality
Milestone

Comments

@6543
Copy link
Member

6543 commented Feb 3, 2020

discoverd on gitea version: 1.10.3

https://try.gitea.io/api/swagger#/issue/issueListLabels
https://try.gitea.io/api/swagger#/issue/issueCreateLabel
there is one inconsistency on those calls
List Labels return the color without #
but Create Label requires the #
it's not a big deal but it is kinda boring for someone who uses it
Because then you get errors like this:
panic: Error creating label [Affects Agent e11d21 This will require a new release of TrustFactor agents]: 422 Unprocessable Entity: [{"fieldNames":["Color"],"classification":"SizeError","message":"Size"}]

@6543
Copy link
Member Author

6543 commented Feb 3, 2020

posible solution: display issueCreateLabel example without '#' and make it pars version with and without '#' on the beginning

@hilariocoelho
Copy link
Contributor

Actually I was kinda thinking about appending the # to the List Labels response

@6543
Copy link
Member Author

6543 commented Feb 3, 2020

this would breace backwards compatebilety :(

@jolheiser
Copy link
Member

posible solution: display issueCreateLabel example without '#' and make it pars version with and without '#' on the beginning

Parsing it regardless of # sounds reasonable to me.

@zeripath zeripath changed the title [API] Inconsequent Lable Format [API] Inconsistent Label Format Feb 9, 2020
@lafriks lafriks added type/bug type/enhancement An improvement of existing functionality and removed type/bug labels Feb 9, 2020
@lafriks lafriks added this to the 1.12.0 milestone Feb 9, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants