summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsebastian-sauer <sauer.sebastian@gmail.com>2023-07-10 09:05:59 +0200
committerGitHub <noreply@github.com>2023-07-10 09:05:59 +0200
commitd2c3a90ee24f6e9e3ffff164fa7e675a269e5add (patch)
tree8f877476bbf4149461a49ba40582ec9d81802582
parentfa0b5b14c2faa6a5f76bb2e7bc9241a5e4354189 (diff)
downloadgitea-d2c3a90ee24f6e9e3ffff164fa7e675a269e5add.tar.gz
gitea-d2c3a90ee24f6e9e3ffff164fa7e675a269e5add.zip
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 <teabot@gitea.io>
-rw-r--r--routers/web/repo/pull.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go
index e0a618bf59..1b68ef352a 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)
}