From 73cf21d9da003c72ebb57c153ab615aeb0b41370 Mon Sep 17 00:00:00 2001 From: Sebastian Sauer Date: Sun, 9 Jul 2023 21:57:21 +0200 Subject: [PATCH] Show edit title button on commits page, too All 3 tabs of the PR (Conversation, Commits and Files changed) should show the edit title button. --- routers/web/repo/pull.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index e0a618bf596c..1b68ef352a4e 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -723,6 +723,9 @@ func ViewPullCommits(ctx *context.Context) { ctx.Data["Commits"] = commits ctx.Data["CommitCount"] = len(commits) + ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) + ctx.Data["IsIssuePoster"] = ctx.IsSigned && issue.IsPoster(ctx.Doer.ID) + getBranchData(ctx, issue) ctx.HTML(http.StatusOK, tplPullCommits) }