From 911257160dac18b2190072577dad8ea80825967f Mon Sep 17 00:00:00 2001 From: metiftikci Date: Thu, 23 May 2024 22:16:00 +0000 Subject: [PATCH] fix pull request view file link --- routers/web/repo/pull.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index bbdc6ca631aed..92e0a1674e080 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)