mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-08-06 09:39:44 +08:00
User facing messages for AGit errors (#33012)
Adds user facing messages to errors when submitting agit pull request Tries to highlight the returned error more and fixes agit suggestion to create PR on first submission. Closes: https://github.com/go-gitea/gitea/issues/32965 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@ -153,7 +153,7 @@ func ProcReceive(ctx context.Context, repo *repo_model.Repository, gitRepo *git.
|
||||
OriginalRef: opts.RefFullNames[i],
|
||||
OldOID: objectFormat.EmptyObjectID().String(),
|
||||
NewOID: opts.NewCommitIDs[i],
|
||||
IsCreatePR: true,
|
||||
IsCreatePR: false, // AGit always creates a pull request so there is no point in prompting user to create one
|
||||
URL: fmt.Sprintf("%s/pulls/%d", repo.HTMLURL(), pr.Index),
|
||||
ShouldShowMessage: setting.Git.PullRequestPushMessage && repo.AllowsPulls(ctx),
|
||||
HeadBranch: headBranch,
|
||||
|
Reference in New Issue
Block a user