diff options
Diffstat (limited to 'routers/private')
-rw-r--r-- | routers/private/hook.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/private/hook.go b/routers/private/hook.go index 1d8cb4b48e..6743d02e84 100644 --- a/routers/private/hook.go +++ b/routers/private/hook.go @@ -19,6 +19,7 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/private" "code.gitea.io/gitea/modules/repofiles" + "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" pull_service "code.gitea.io/gitea/services/pull" "gopkg.in/src-d/go-git.v4/plumbing" @@ -428,14 +429,14 @@ func HookPostReceive(ctx *macaron.Context, opts private.HookOptions) { branch = fmt.Sprintf("%s:%s", repo.OwnerName, branch) } results = append(results, private.HookPostReceiveBranchResult{ - Message: true, + Message: setting.Git.PullRequestPushMessage && repo.AllowsPulls(), Create: true, Branch: branch, URL: fmt.Sprintf("%s/compare/%s...%s", baseRepo.HTMLURL(), util.PathEscapeSegments(baseRepo.DefaultBranch), util.PathEscapeSegments(branch)), }) } else { results = append(results, private.HookPostReceiveBranchResult{ - Message: true, + Message: setting.Git.PullRequestPushMessage && repo.AllowsPulls(), Create: false, Branch: branch, URL: fmt.Sprintf("%s/pulls/%d", baseRepo.HTMLURL(), pr.Index), |