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 (go-gitea#31063)

as title
  • Loading branch information
metiftikci authored and GiteaBot committed May 25, 2024
1 parent 7d56ee3 commit c3c508e
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 c3c508e

Please sign in to comment.