Skip to content

Commit 54cb733

Browse files
committed
disable create message in services instead of hook
1 parent 2d57d46 commit 54cb733

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

cmd/hook.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,8 +705,7 @@ Gitea or set your environment appropriately.`, "")
705705

706706
if err == nil {
707707
for _, res := range resp.Results {
708-
// AGit always creates a pull request so there is no point in prompting user to create one
709-
hookPrintResult(res.ShouldShowMessage, false, res.HeadBranch, res.URL)
708+
hookPrintResult(res.ShouldShowMessage, res.IsCreatePR, res.HeadBranch, res.URL)
710709
}
711710
}
712711

services/agit/agit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func ProcReceive(ctx context.Context, repo *repo_model.Repository, gitRepo *git.
153153
OriginalRef: opts.RefFullNames[i],
154154
OldOID: objectFormat.EmptyObjectID().String(),
155155
NewOID: opts.NewCommitIDs[i],
156-
IsCreatePR: true,
156+
IsCreatePR: false, // AGit always creates a pull request so there is no point in prompting user to create one
157157
URL: fmt.Sprintf("%s/pulls/%d", repo.HTMLURL(), pr.Index),
158158
ShouldShowMessage: setting.Git.PullRequestPushMessage && repo.AllowsPulls(ctx),
159159
HeadBranch: headBranch,

0 commit comments

Comments
 (0)