aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
Diffstat (limited to 'routers')
-rw-r--r--routers/web/org/setting.go2
-rw-r--r--routers/web/repo/issue_label.go2
-rw-r--r--routers/web/repo/issue_label_test.go2
-rw-r--r--routers/web/repo/repo.go4
4 files changed, 6 insertions, 4 deletions
diff --git a/routers/web/org/setting.go b/routers/web/org/setting.go
index 7d84c101d8..db8fc728df 100644
--- a/routers/web/org/setting.go
+++ b/routers/web/org/setting.go
@@ -246,6 +246,6 @@ func Labels(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("repo.labels")
ctx.Data["PageIsOrgSettings"] = true
ctx.Data["PageIsOrgSettingsLabels"] = true
- ctx.Data["LabelTemplates"] = repo_module.LabelTemplates
+ ctx.Data["LabelTemplateFiles"] = repo_module.LabelTemplateFiles
ctx.HTML(http.StatusOK, tplSettingsLabels)
}
diff --git a/routers/web/repo/issue_label.go b/routers/web/repo/issue_label.go
index 3123359a65..002acbf1d3 100644
--- a/routers/web/repo/issue_label.go
+++ b/routers/web/repo/issue_label.go
@@ -28,7 +28,7 @@ func Labels(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("repo.labels")
ctx.Data["PageIsIssueList"] = true
ctx.Data["PageIsLabels"] = true
- ctx.Data["LabelTemplates"] = repo_module.LabelTemplates
+ ctx.Data["LabelTemplateFiles"] = repo_module.LabelTemplateFiles
ctx.HTML(http.StatusOK, tplLabels)
}
diff --git a/routers/web/repo/issue_label_test.go b/routers/web/repo/issue_label_test.go
index a62d2afaa8..c24fe898b6 100644
--- a/routers/web/repo/issue_label_test.go
+++ b/routers/web/repo/issue_label_test.go
@@ -10,6 +10,7 @@ import (
issues_model "code.gitea.io/gitea/models/issues"
"code.gitea.io/gitea/models/unittest"
+ "code.gitea.io/gitea/modules/repository"
"code.gitea.io/gitea/modules/test"
"code.gitea.io/gitea/modules/web"
"code.gitea.io/gitea/services/forms"
@@ -30,6 +31,7 @@ func int64SliceToCommaSeparated(a []int64) string {
func TestInitializeLabels(t *testing.T) {
unittest.PrepareTestEnv(t)
+ assert.NoError(t, repository.LoadRepoConfig())
ctx := test.MockContext(t, "user2/repo1/labels/initialize")
test.LoadUser(t, ctx, 2)
test.LoadRepo(t, ctx, 2)
diff --git a/routers/web/repo/repo.go b/routers/web/repo/repo.go
index b4e7b5a46e..9b80e85324 100644
--- a/routers/web/repo/repo.go
+++ b/routers/web/repo/repo.go
@@ -132,7 +132,7 @@ func Create(ctx *context.Context) {
// Give default value for template to render.
ctx.Data["Gitignores"] = repo_module.Gitignores
- ctx.Data["LabelTemplates"] = repo_module.LabelTemplates
+ ctx.Data["LabelTemplateFiles"] = repo_module.LabelTemplateFiles
ctx.Data["Licenses"] = repo_module.Licenses
ctx.Data["Readmes"] = repo_module.Readmes
ctx.Data["readme"] = "Default"
@@ -200,7 +200,7 @@ func CreatePost(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("new_repo")
ctx.Data["Gitignores"] = repo_module.Gitignores
- ctx.Data["LabelTemplates"] = repo_module.LabelTemplates
+ ctx.Data["LabelTemplateFiles"] = repo_module.LabelTemplateFiles
ctx.Data["Licenses"] = repo_module.Licenses
ctx.Data["Readmes"] = repo_module.Readmes