Backport #26399 Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: Giteabot <teabot@gitea.io> (cherry picked from commit f43df2f8201c33260b65b582556a3b0f4c75b637)
This commit is contained in:
parent
19a49e763a
commit
5abca17b64
1 changed files with 47 additions and 45 deletions
|
@ -2834,6 +2834,7 @@ func NewComment(ctx *context.Context) {
|
||||||
|
|
||||||
// check whether the ref of PR <refs/pulls/pr_index/head> in base repo is consistent with the head commit of head branch in the head repo
|
// check whether the ref of PR <refs/pulls/pr_index/head> in base repo is consistent with the head commit of head branch in the head repo
|
||||||
// get head commit of PR
|
// get head commit of PR
|
||||||
|
if pull.Flow == issues_model.PullRequestFlowGithub {
|
||||||
prHeadRef := pull.GetGitRefName()
|
prHeadRef := pull.GetGitRefName()
|
||||||
if err := pull.LoadBaseRepo(ctx); err != nil {
|
if err := pull.LoadBaseRepo(ctx); err != nil {
|
||||||
ctx.ServerError("Unable to load base repo", err)
|
ctx.ServerError("Unable to load base repo", err)
|
||||||
|
@ -2883,6 +2884,7 @@ func NewComment(ctx *context.Context) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if pr != nil {
|
if pr != nil {
|
||||||
ctx.Flash.Info(ctx.Tr("repo.pulls.open_unmerged_pull_exists", pr.Index))
|
ctx.Flash.Info(ctx.Tr("repo.pulls.open_unmerged_pull_exists", pr.Index))
|
||||||
|
|
Loading…
Reference in a new issue