Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Implement Issue Config #20956
Implement Issue Config #20956
Changes from 7 commits
fac2cb6
adb916e
c7a8ee4
4d008fc
ecbbbe9
7b4415b
bdd3c2a
146bd6b
bb72aea
8624c96
714e92e
18fe929
099def7
fe94b82
5ae2ed0
0564f5c
b34913f
c1dc3e4
abf14a5
2a16447
579b8e5
1f52bb7
ed09834
0e01deb
b054f49
17185ab
062375f
c820b91
2ad3111
b9750dc
7a4c6f8
159c0f7
68f508b
609840c
31d1353
d4a69d5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
What I've noticed from having to work with the GitHub templates already:
Collaborators who already have a lot of in-depth knowledge about a project tend to specify their issues with enough detail that they don't necessarily need to input all troubleshooting information.
Having to fill out the template can be pretty tiresome, especially for large projects like Gitea itself, and often leads to entering unnecessary information simply to satisfy the validation.
This means that later on, another value
for-contributors
, for example, could be added.So, we could think about converting the type to (bool/)
string
, to support more use cases later on.You don't need to implement the additional functionality I mentioned yet as that can be postponed.
However, I think converting it into a string can already be done in this PR.
As far as I know, it should not make a difference for the yaml parser.
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.
I agree that having such a setting would be useful, but @lunny requested compatibility with GitHub above, that's the reason it also searches in .github for the config. On GitHub,
blank_issues_enabled
is a boolean. That doesn't mean we can't add our own settings, but if we want compatibility with GitHub, we should not use a different type for the same setting as GitHub. Another setting would be the better solution here.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.
But it would accept the same things as GitHub:
true, yes, on, off, no, false
(->strconv.ParseBool
),and then more (i.e.
for-contributors
).So it would still be compatible with GitHub?
As far as I know, you don't need
"
around a YAML string…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.
That's true in most cases, but reserved keywords like
true
orfalse
or numbers needs quotes to be accepted as string.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.
Oh. Didn't know that.
But can our YAML Parser perhaps reconvert a boolean to a string?
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.
fwiw the parser seems to gracefully handle it, though I would need to test it in this context specifically.
https://go.dev/play/p/jNdWPWtK-Jz
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.
I strongly disagree there.
That simply allows for an ungodly amount of edge cases and illegal states.
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.
That's exactly what I hoped for.
This means we can still convert it without repercussions.
But I agree with @jolheiser, we should certainly ensure with a test that this behavior is fulfilled.
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.
I still think this is a bad idea. Even is that could parsed, this will confuse users and is still not comptaible with GitHub. I will keep the current behaviour for this PR. It is better to do is in another PR.
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.
We can just keep it only allow
true
andfalse
in this PR. And in future PR, it can be allowed other values but we don't need to discuss it in this PR.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.
Shouldn't that be a part of
options/locale/locale_en-US.ini
?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.
Sorry. I forgot to change it from my tests. I will do it later, when I have time.