summaryrefslogtreecommitdiffstats
path: root/models/issue_label.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-01-12 20:11:17 +0800
committerGitHub <noreply@github.com>2020-01-12 20:11:17 +0800
commitb465d0d78793da6e67890a7cb9d3ae1b807c53ca (patch)
tree1cdfb83699ad2fd31d5835bb2ac1e1b579eaf784 /models/issue_label.go
parent5765212c6dbcaeb27779707af3ca57775e535bd9 (diff)
downloadgitea-b465d0d78793da6e67890a7cb9d3ae1b807c53ca.tar.gz
gitea-b465d0d78793da6e67890a7cb9d3ae1b807c53ca.zip
Move create/fork repository from models to modules/repository (#9489)
* Move create/fork repository from models to modules/repository * fix wrong reference * fix test * fix test * fix lint * Fix DBContext * remove duplicated TestMain * fix lint * fix conflicts
Diffstat (limited to 'models/issue_label.go')
-rw-r--r--models/issue_label.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/models/issue_label.go b/models/issue_label.go
index d96152d463..66f93f4f48 100644
--- a/models/issue_label.go
+++ b/models/issue_label.go
@@ -22,9 +22,9 @@ var labelColorPattern = regexp.MustCompile("#([a-fA-F0-9]{6})")
// GetLabelTemplateFile loads the label template file by given name,
// then parses and returns a list of name-color pairs and optionally description.
func GetLabelTemplateFile(name string) ([][3]string, error) {
- data, err := getRepoInitFile("label", name)
+ data, err := GetRepoInitFile("label", name)
if err != nil {
- return nil, fmt.Errorf("getRepoInitFile: %v", err)
+ return nil, fmt.Errorf("GetRepoInitFile: %v", err)
}
lines := strings.Split(string(data), "\n")
@@ -175,8 +175,8 @@ func initalizeLabels(e Engine, repoID int64, labelTemplate string) error {
}
// InitalizeLabels adds a label set to a repository using a template
-func InitalizeLabels(repoID int64, labelTemplate string) error {
- return initalizeLabels(x, repoID, labelTemplate)
+func InitalizeLabels(ctx DBContext, repoID int64, labelTemplate string) error {
+ return initalizeLabels(ctx.e, repoID, labelTemplate)
}
func newLabel(e Engine, label *Label) error {