Fix incorrect "Target branch does not exist" in PR title (#32222)

This commit is contained in:
Zettat123 2024-10-10 08:25:46 +08:00 committed by GitHub
parent 8bee7fcf7e
commit 4eacc61f64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -166,7 +166,7 @@ func setMergeTarget(ctx *context.Context, pull *issues_model.PullRequest) {
ctx.Data["BaseTarget"] = pull.BaseBranch ctx.Data["BaseTarget"] = pull.BaseBranch
headBranchLink := "" headBranchLink := ""
if pull.Flow == issues_model.PullRequestFlowGithub { if pull.Flow == issues_model.PullRequestFlowGithub {
b, err := git_model.GetBranch(ctx, ctx.Repo.Repository.ID, pull.HeadBranch) b, err := git_model.GetBranch(ctx, pull.HeadRepoID, pull.HeadBranch)
switch { switch {
case err == nil: case err == nil:
if !b.IsDeleted { if !b.IsDeleted {