diff options
author | Giteabot <teabot@gitea.io> | 2024-05-26 22:07:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-26 14:07:17 +0000 |
commit | 02b947a15fa92809f80277c541f6cee69457cafb (patch) | |
tree | 41aacc555247915bb690086b91e821708d1e28ba | |
parent | 7b7318255e68ee7e4d0f5b1b8e5ef91cd72a59e5 (diff) | |
download | gitea-02b947a15fa92809f80277c541f6cee69457cafb.tar.gz gitea-02b947a15fa92809f80277c541f6cee69457cafb.zip |
Fix `View File` button link if branch deleted on pull request files pages (#31063) (#31077)
-rw-r--r-- | routers/web/repo/pull.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index bbdc6ca631..92e0a1674e 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -862,7 +862,7 @@ func viewPullFiles(ctx *context.Context, specifiedStartCommit, specifiedEndCommi } if pull.HeadRepo != nil { - ctx.Data["SourcePath"] = pull.HeadRepo.Link() + "/src/branch/" + util.PathEscapeSegments(pull.HeadBranch) + ctx.Data["SourcePath"] = pull.HeadRepo.Link() + "/src/commit/" + endCommitID if !pull.HasMerged && ctx.Doer != nil { perm, err := access_model.GetUserRepoPermission(ctx, pull.HeadRepo, ctx.Doer) |