summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/api.go
diff options
context:
space:
mode:
authorJakobDev <jakobdev@gmx.de>2023-03-28 20:22:07 +0200
committerGitHub <noreply@github.com>2023-03-28 14:22:07 -0400
commitf384b13f1cd44be3a87df5553a0099390dacd010 (patch)
tree08b2744df3a8792ef2f50e4d559d55e4a349c198 /routers/api/v1/api.go
parent5cd1d6c93ba9b8399f826e671b8940eb5294b872 (diff)
downloadgitea-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 'routers/api/v1/api.go')
-rw-r--r--routers/api/v1/api.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index 7d1980baeb..8b13f5492c 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -1169,6 +1169,8 @@ func Routes(ctx gocontext.Context) *web.Route {
}, reqAdmin())
}, reqAnyRepoReader())
m.Get("/issue_templates", context.ReferencesGitRepo(), repo.GetIssueTemplates)
+ m.Get("/issue_config", context.ReferencesGitRepo(), repo.GetIssueConfig)
+ m.Get("/issue_config/validate", context.ReferencesGitRepo(), repo.ValidateIssueConfig)
m.Get("/languages", reqRepoReader(unit.TypeCode), repo.GetLanguages)
}, repoAssignment())
})