aboutsummaryrefslogtreecommitdiffstats
path: root/routers/private/hook_pre_receive.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2022-05-02 01:54:44 +0200
committerGitHub <noreply@github.com>2022-05-02 01:54:44 +0200
commitd8905cb623cf55194eec5f1ed97fdc7bb30ff1cb (patch)
tree0027fccb3c7ffe4bc5b5144998d08320c41fa3e4 /routers/private/hook_pre_receive.go
parent3725fa28ccc01ab08060f591f894ea6443a348e8 (diff)
downloadgitea-d8905cb623cf55194eec5f1ed97fdc7bb30ff1cb.tar.gz
gitea-d8905cb623cf55194eec5f1ed97fdc7bb30ff1cb.zip
Dont overwrite err with nil & rename PullCheckingFuncs to reflect there usage (#19572)
- dont overwrite err with nil unintentionaly - rename CheckPRReadyToMerge to CheckPullBranchProtections - rename prQueue to prPatchCheckerQueue from #9307 Co-authored-by: delvh <dev.lh@web.de>
Diffstat (limited to 'routers/private/hook_pre_receive.go')
-rw-r--r--routers/private/hook_pre_receive.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/private/hook_pre_receive.go b/routers/private/hook_pre_receive.go
index 8824d9cc39..731b36fc1e 100644
--- a/routers/private/hook_pre_receive.go
+++ b/routers/private/hook_pre_receive.go
@@ -343,7 +343,7 @@ func preReceiveBranch(ctx *preReceiveContext, oldCommitID, newCommitID, refFullN
}
// Check all status checks and reviews are ok
- if err := pull_service.CheckPRReadyToMerge(ctx, pr, true); err != nil {
+ if err := pull_service.CheckPullBranchProtections(ctx, pr, true); err != nil {
if models.IsErrDisallowedToMerge(err) {
log.Warn("Forbidden: User %d is not allowed push to protected branch %s in %-v and pr #%d is not ready to be merged: %s", ctx.opts.UserID, branchName, repo, pr.Index, err.Error())
ctx.JSON(http.StatusForbidden, private.Response{