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)

as title
  • Loading branch information
metiftikci committed May 25, 2024
1 parent ec771fd commit 47e715a
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 47e715a

Please sign in to comment.