Skip to content

Commit d2c3a90

Browse files
Show edit title button on commits tab of PR, too (#25791)
All 3 tabs of the PR (Conversation, Commits and Files changed) should show the edit title button. Before this commit the edit button was not shown on commits tab Screenshots: After: ![image](https://github.com/go-gitea/gitea/assets/1135157/d04c700c-dffc-4bcd-8108-cb64838af0c6) Before: ![image](https://github.com/go-gitea/gitea/assets/1135157/b6795ad3-c994-461c-98aa-a7331c3e3877) Just for reference the edit button in files changed tab: ![image](https://github.com/go-gitea/gitea/assets/1135157/5750640d-489f-4a71-8144-543ef42afb42) Co-authored-by: Giteabot <[email protected]>
1 parent fa0b5b1 commit d2c3a90

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

routers/web/repo/pull.go

+3
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,9 @@ func ViewPullCommits(ctx *context.Context) {
723723
ctx.Data["Commits"] = commits
724724
ctx.Data["CommitCount"] = len(commits)
725725

726+
ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull)
727+
ctx.Data["IsIssuePoster"] = ctx.IsSigned && issue.IsPoster(ctx.Doer.ID)
728+
726729
getBranchData(ctx, issue)
727730
ctx.HTML(http.StatusOK, tplPullCommits)
728731
}

0 commit comments

Comments
 (0)