forked from NYANDEV/forgejo
fix reopen logic for agit flow pull request (#26399)
the head branch is meaningless for a agit flow pull request, so should not check it when reopen it. related: #24231 fix #26334 Signed-off-by: a1012112796 <1012112796@qq.com>
This commit is contained in:
parent
5feef6d5c0
commit
f00fdd1abd
1 changed files with 46 additions and 44 deletions
|
@ -2935,6 +2935,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
|
||||
// get head commit of PR
|
||||
if pull.Flow == issues_model.PullRequestFlowGithub {
|
||||
prHeadRef := pull.GetGitRefName()
|
||||
if err := pull.LoadBaseRepo(ctx); err != nil {
|
||||
ctx.ServerError("Unable to load base repo", err)
|
||||
|
@ -2983,6 +2984,7 @@ func NewComment(ctx *context.Context) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if pr != nil {
|
||||
ctx.Flash.Info(ctx.Tr("repo.pulls.open_unmerged_pull_exists", pr.Index))
|
||||
|
|
Loading…
Reference in a new issue