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/merge.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/merge.go')
-rw-r--r-- | services/pull/merge.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/pull/merge.go b/services/pull/merge.go index afed98989b..9270fb8cbc 100644 --- a/services/pull/merge.go +++ b/services/pull/merge.go @@ -752,7 +752,7 @@ func IsUserAllowedToMerge(ctx context.Context, pr *issues_model.PullRequest, p a return false, nil } - err := pr.LoadProtectedBranchCtx(ctx) + err := pr.LoadProtectedBranch(ctx) if err != nil { return false, err } @@ -770,7 +770,7 @@ func CheckPullBranchProtections(ctx context.Context, pr *issues_model.PullReques return fmt.Errorf("LoadBaseRepo: %w", err) } - if err = pr.LoadProtectedBranchCtx(ctx); err != nil { + if err = pr.LoadProtectedBranch(ctx); err != nil { return fmt.Errorf("LoadProtectedBranch: %w", err) } if pr.ProtectedBranch == nil { |