]> source.dussan.org Git - gitea.git/commitdiff
Fix incorrect "Target branch does not exist" in PR title (#32222)
authorZettat123 <zettat123@gmail.com>
Thu, 10 Oct 2024 00:25:46 +0000 (08:25 +0800)
committerGitHub <noreply@github.com>
Thu, 10 Oct 2024 00:25:46 +0000 (08:25 +0800)
routers/web/repo/pull.go

index ced0bbc15a00e21c95366912071b4fe3fdd4d024..02d9b429b557b98288dd7f9eb695c58a62795a06 100644 (file)
@@ -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 {