-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Issue template with empty labels value #17877
Labels
Comments
So, on https://github.com/go-gitea/gitea/blob/main/modules/structs/issue.go#L129 Labels is supposed to be a string array, not a string. I assume the yaml parser from github (in ruby I guess) is more forgiving than the one in go. I see nothing in the doc of the module that allow to change that. |
zeripath
pushed a commit
that referenced
this issue
Nov 19, 2022
The [labels in issue YAML templates](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms#top-level-syntax) can be a string array or a comma-delimited string, so a single string should be valid labels. The old codes committed in #20987 ignore this, that's why the warning is displayed: <img width="618" alt="image" src="https://user-images.githubusercontent.com/9418365/202112642-93dc72d0-71c3-40a2-9720-30fc2d48c97c.png"> Fixes #17877.
zeripath
pushed a commit
that referenced
this issue
Nov 20, 2022
…21873) Backport #21831. The [labels in issue YAML templates](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms#top-level-syntax) can be a string array or a comma-delimited string, so a single string should be valid labels. The old codes committed in #20987 ignore this, that's why the warning is displayed: <img width="618" alt="image" src="https://user-images.githubusercontent.com/9418365/202112642-93dc72d0-71c3-40a2-9720-30fc2d48c97c.png"> Fixes #17877.
fsologureng
pushed a commit
to fsologureng/gitea
that referenced
this issue
Nov 22, 2022
…21831) The [labels in issue YAML templates](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms#top-level-syntax) can be a string array or a comma-delimited string, so a single string should be valid labels. The old codes committed in go-gitea#20987 ignore this, that's why the warning is displayed: <img width="618" alt="image" src="https://user-images.githubusercontent.com/9418365/202112642-93dc72d0-71c3-40a2-9720-30fc2d48c97c.png"> Fixes go-gitea#17877.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Gitea Version
1.15.6
Git Version
2.34.1
Operating System
FreeBSD
How are you running Gitea?
I run Gitea in a FreeBSD jail, installed from the package.
Database
MySQL
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
Description
Hey,
when using an issue template that has an empty labels string (which github accepts), gitea bails out at reading the template with an
error.
Upon investigating the source, this seems to be coming from the labels key having an empty value in the issue template:
I will try and remove that key now and see if it works, but this behavior was accepted with github, whereas it isn't with gitea. A quick fix would be nice to have for it, so other people won't bump into the same problem wondering why issue templates doesn't work after migrating from github.
Screenshots
No response
The text was updated successfully, but these errors were encountered: