-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Implement Issue Config #20956
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
Changes from 9 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
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -190,6 +190,10 @@ func (l *IssueTemplateLabels) UnmarshalYAML(value *yaml.Node) error { | |
return fmt.Errorf("line %d: cannot unmarshal %s into IssueTemplateLabels", value.Line, value.ShortTag()) | ||
} | ||
|
||
type IssueConfig struct { | ||
BlankIssuesEnabled bool `json:"blank_issues_enabled" yaml:"blank_issues_enabled"` | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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: There was a problem hiding this comment. Choose a reason for hiding this commentThe 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, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But it would accept the same things as GitHub: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
That's true in most cases, but reserved keywords like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh. Didn't know that. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I strongly disagree there. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
That's exactly what I hoped for. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. We can just keep it only allow |
||
|
||
// IssueTemplateType defines issue template type | ||
type IssueTemplateType string | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,17 +20,27 @@ | |
</div> | ||
</div> | ||
{{end}} | ||
<div class="ui attached segment"> | ||
<div class="ui two column grid"> | ||
<div class="column left aligned"> | ||
<strong>{{.locale.Tr "repo.issues.choose.blank"}}</strong> | ||
<br/>{{.locale.Tr "repo.issues.choose.blank_about"}} | ||
{{if .IssueConfig.BlankIssuesEnabled}} | ||
<div class="ui attached segment"> | ||
<div class="ui two column grid"> | ||
<div class="column left aligned"> | ||
<strong>{{.locale.Tr "repo.issues.choose.blank"}}</strong> | ||
<br/>{{.locale.Tr "repo.issues.choose.blank_about"}} | ||
</div> | ||
<div class="column right aligned"> | ||
<a href="{{.RepoLink}}/issues/new?{{if .milestone}}&milestone={{.milestone}}{{end}}{{if $.project}}&project={{$.project}}{{end}}" class="ui green button">{{$.locale.Tr "repo.issues.choose.get_started"}}</a> | ||
</div> | ||
</div> | ||
<div class="column right aligned"> | ||
<a href="{{.RepoLink}}/issues/new?{{if .milestone}}&milestone={{.milestone}}{{end}}{{if $.project}}&project={{$.project}}{{end}}" class="ui green button">{{$.locale.Tr "repo.issues.choose.get_started"}}</a> | ||
</div> | ||
{{end}} | ||
{{- if .IssueConfigError}} | ||
JakobDev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<div class="ui warning message"> | ||
<div class="text left"> | ||
<div>Your issue_config.yaml contains a error:</div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't that be a part of There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
<diy>{{.IssueConfigError}}</div> | ||
</div> | ||
</div> | ||
</div> | ||
{{end}} | ||
JakobDev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</div> | ||
</div> | ||
{{template "base/footer" .}} |
Uh oh!
There was an error while loading. Please reload this page.