diff options
author | JakobDev <jakobdev@gmx.de> | 2023-03-28 20:22:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-28 14:22:07 -0400 |
commit | f384b13f1cd44be3a87df5553a0099390dacd010 (patch) | |
tree | 08b2744df3a8792ef2f50e4d559d55e4a349c198 /modules/structs | |
parent | 5cd1d6c93ba9b8399f826e671b8940eb5294b872 (diff) | |
download | gitea-f384b13f1cd44be3a87df5553a0099390dacd010.tar.gz gitea-f384b13f1cd44be3a87df5553a0099390dacd010.zip |
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.
Diffstat (limited to 'modules/structs')
-rw-r--r-- | modules/structs/issue.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/structs/issue.go b/modules/structs/issue.go index 1d1de9ee5e..04e169df84 100644 --- a/modules/structs/issue.go +++ b/modules/structs/issue.go @@ -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 |