diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-01-12 20:11:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-12 20:11:17 +0800 |
commit | b465d0d78793da6e67890a7cb9d3ae1b807c53ca (patch) | |
tree | 1cdfb83699ad2fd31d5835bb2ac1e1b579eaf784 /models/issue_label.go | |
parent | 5765212c6dbcaeb27779707af3ca57775e535bd9 (diff) | |
download | gitea-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.go | 8 |
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 { |