diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2022-03-29 15:23:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-29 15:23:45 +0800 |
commit | 76aa33d884af283619054ed14a6137efc14b6d35 (patch) | |
tree | 238f2bc5add522767df93cd6064ed4037b0d3b1b /models/repo_generate.go | |
parent | b06b9a056c0af751e576978f6ef3c914ee959b9c (diff) | |
download | gitea-76aa33d884af283619054ed14a6137efc14b6d35.tar.gz gitea-76aa33d884af283619054ed14a6137efc14b6d35.zip |
Move init repository related functions to modules (#19159)
* Move init repository related functions to modules
* Fix lint
* Use ctx but db.DefaultContext
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'models/repo_generate.go')
-rw-r--r-- | models/repo_generate.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/repo_generate.go b/models/repo_generate.go index 03b0908397..7d6d262aab 100644 --- a/models/repo_generate.go +++ b/models/repo_generate.go @@ -110,7 +110,7 @@ func GenerateIssueLabels(ctx context.Context, templateRepo, generateRepo *repo_m Description: templateLabel.Description, Color: templateLabel.Color, } - if err := newLabel(db.GetEngine(ctx), generateLabel); err != nil { + if err := db.Insert(ctx, generateLabel); err != nil { return err } } |