0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-11 04:21:21 +01:00

Fix View File button link if branch deleted on pull request files pages (#31063) (#31077)

This commit is contained in:
Giteabot 2024-05-26 22:07:17 +08:00 committed by GitHub
parent 7b7318255e
commit 02b947a15f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)