mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
Implement Issue Config (#20956)
Closes #20955 This PR adds the possibility to disable blank Issues, when the Repo has templates. This can be done by creating the file `.gitea/issue_config.yaml` with the content `blank_issues_enabled` in the Repo.
This commit is contained in:
@ -190,6 +190,22 @@ func (l *IssueTemplateLabels) UnmarshalYAML(value *yaml.Node) error {
|
||||
return fmt.Errorf("line %d: cannot unmarshal %s into IssueTemplateLabels", value.Line, value.ShortTag())
|
||||
}
|
||||
|
||||
type IssueConfigContactLink struct {
|
||||
Name string `json:"name" yaml:"name"`
|
||||
URL string `json:"url" yaml:"url"`
|
||||
About string `json:"about" yaml:"about"`
|
||||
}
|
||||
|
||||
type IssueConfig struct {
|
||||
BlankIssuesEnabled bool `json:"blank_issues_enabled" yaml:"blank_issues_enabled"`
|
||||
ContactLinks []IssueConfigContactLink `json:"contact_links" yaml:"contact_links"`
|
||||
}
|
||||
|
||||
type IssueConfigValidation struct {
|
||||
Valid bool `json:"valid"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
// IssueTemplateType defines issue template type
|
||||
type IssueTemplateType string
|
||||
|
||||
|
Reference in New Issue
Block a user