Skip to content

Commit

Permalink
Fix View File button link if branch deleted on pull request files p…
Browse files Browse the repository at this point in the history
…ages (#31063) (#31077)
  • Loading branch information
GiteaBot authored May 26, 2024
1 parent 7b73182 commit 02b947a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routers/web/repo/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 02b947a

Please sign in to comment.