Skip to content

Commit 799fb4b

Browse files
committed
skip test headBranchSha != sha when PR is closed
1 parent fd59c8c commit 799fb4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/web/repo/pull.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *issues_model.Issue) *git.C
587587
ctx.Data["HeadBranchCommitID"] = headBranchSha
588588
ctx.Data["PullHeadCommitID"] = sha
589589

590-
if pull.HeadRepo == nil || !headBranchExist {
590+
if pull.HeadRepo == nil || !headBranchExist || (!pull.Issue.IsClosed && (headBranchSha != sha)) {
591591
ctx.Data["IsPullRequestBroken"] = true
592592
if pull.IsSameRepo() {
593593
ctx.Data["HeadTarget"] = pull.HeadBranch

0 commit comments

Comments
 (0)