diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2022-12-03 10:48:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-03 10:48:26 +0800 |
commit | 0a7d3ff786508284224ada17956a65bb759d9265 (patch) | |
tree | 4860fca95c1432ab59c6723ee2b053b1c7d6779d /services/pull/patch.go | |
parent | 8698458f48eafeab21014db544aa7160368856e1 (diff) | |
download | gitea-0a7d3ff786508284224ada17956a65bb759d9265.tar.gz gitea-0a7d3ff786508284224ada17956a65bb759d9265.zip |
refactor some functions to support ctx as first parameter (#21878)
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'services/pull/patch.go')
-rw-r--r-- | services/pull/patch.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/pull/patch.go b/services/pull/patch.go index 925f310a2c..2d495a3d72 100644 --- a/services/pull/patch.go +++ b/services/pull/patch.go @@ -14,6 +14,7 @@ import ( "strings" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/models/db" issues_model "code.gitea.io/gitea/models/issues" "code.gitea.io/gitea/models/unit" "code.gitea.io/gitea/modules/container" @@ -533,7 +534,7 @@ func checkPullFilesProtection(pr *issues_model.PullRequest, gitRepo *git.Reposit return nil } - if err := pr.LoadProtectedBranch(); err != nil { + if err := pr.LoadProtectedBranch(db.DefaultContext); err != nil { return err } |