forked from forgejo/forgejo
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>
This commit is contained in:
parent
8698458f48
commit
0a7d3ff786
145 changed files with 360 additions and 369 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue