mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-07-07 09:55:41 +02:00
fix: check PR reference on base repository (#8431)
- Regression of forgejo/forgejo#8425 (I was fooled by the github flow being `headGitRepo`). Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8431 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Gusted <postmaster@gusted.xyz> Co-committed-by: Gusted <postmaster@gusted.xyz>
This commit is contained in:
parent
466e7bfcb8
commit
ff5ef8fe8b
2 changed files with 2 additions and 2 deletions
|
@ -638,7 +638,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *issues_model.Issue) *git.C
|
||||||
if pull.Flow == issues_model.PullRequestFlowGithub {
|
if pull.Flow == issues_model.PullRequestFlowGithub {
|
||||||
headBranchExist = headGitRepo.IsBranchExist(pull.HeadBranch)
|
headBranchExist = headGitRepo.IsBranchExist(pull.HeadBranch)
|
||||||
} else {
|
} else {
|
||||||
headBranchExist = headGitRepo.IsReferenceExist(pull.GetGitRefName())
|
headBranchExist = baseGitRepo.IsReferenceExist(pull.GetGitRefName())
|
||||||
}
|
}
|
||||||
|
|
||||||
if headBranchExist {
|
if headBranchExist {
|
||||||
|
|
|
@ -162,7 +162,7 @@ func handlePullRequestAutoMerge(pullID int64, sha string) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
case issues_model.PullRequestFlowAGit:
|
case issues_model.PullRequestFlowAGit:
|
||||||
headBranchExist := headGitRepo.IsReferenceExist(pr.GetGitRefName())
|
headBranchExist := baseGitRepo.IsReferenceExist(pr.GetGitRefName())
|
||||||
if !headBranchExist {
|
if !headBranchExist {
|
||||||
log.Warn("Head branch of auto merge %-v does not exist [HeadRepoID: %d, Branch(Agit): %s]", pr, pr.HeadRepoID, pr.HeadBranch)
|
log.Warn("Head branch of auto merge %-v does not exist [HeadRepoID: %d, Branch(Agit): %s]", pr, pr.HeadRepoID, pr.HeadBranch)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue