From 4eacc61f645bbe259e22fba6f7111c8817de0652 Mon Sep 17 00:00:00 2001 From: Zettat123 Date: Thu, 10 Oct 2024 08:25:46 +0800 Subject: [PATCH] Fix incorrect "Target branch does not exist" in PR title (#32222) --- routers/web/repo/pull.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index ced0bbc15a..02d9b429b5 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -166,7 +166,7 @@ func setMergeTarget(ctx *context.Context, pull *issues_model.PullRequest) { ctx.Data["BaseTarget"] = pull.BaseBranch headBranchLink := "" 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 { case err == nil: if !b.IsDeleted { -- 2.39.5