aboutsummaryrefslogtreecommitdiffstats
path: root/routers/private/hook_pre_receive.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2022-05-03 21:46:28 +0200
committerGitHub <noreply@github.com>2022-05-03 21:46:28 +0200
commit92f139d091c906cc6d30599101d45c62a208f585 (patch)
treee7be0dfc3cd9ae0611bd7cfa11cc1ee277e756fd /routers/private/hook_pre_receive.go
parent730420b6b32414db7fcd12ede87712b0f960de7b (diff)
downloadgitea-92f139d091c906cc6d30599101d45c62a208f585.tar.gz
gitea-92f139d091c906cc6d30599101d45c62a208f585.zip
Use for a repo action one database transaction (#19576)
... more context (part of #9307)
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 731b36fc1e..d2203a1f99 100644
--- a/routers/private/hook_pre_receive.go
+++ b/routers/private/hook_pre_receive.go
@@ -311,7 +311,7 @@ func preReceiveBranch(ctx *preReceiveContext, oldCommitID, newCommitID, refFullN
// Now check if the user is allowed to merge PRs for this repository
// Note: we can use ctx.perm and ctx.user directly as they will have been loaded above
- allowedMerge, err := pull_service.IsUserAllowedToMerge(pr, ctx.userPerm, ctx.user)
+ allowedMerge, err := pull_service.IsUserAllowedToMerge(ctx, pr, ctx.userPerm, ctx.user)
if err != nil {
log.Error("Error calculating if allowed to merge: %v", err)
ctx.JSON(http.StatusInternalServerError, private.Response{