aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/web.go
diff options
context:
space:
mode:
authorhiifong <i@hiif.ong>2023-07-03 09:00:28 +0800
committerGitHub <noreply@github.com>2023-07-03 01:00:28 +0000
commit36f1fa779213695db249d2215233e9cec2d5da7c (patch)
tree5a204eb2c34cf2b7b23a26dbb74c2241696630fb /routers/web/web.go
parenteab011db58a3cfdedc6a4d88c354829c38fd84c0 (diff)
downloadgitea-36f1fa779213695db249d2215233e9cec2d5da7c.tar.gz
gitea-36f1fa779213695db249d2215233e9cec2d5da7c.zip
Support displaying diff stats in PR tab bar (#25387)
Fix #25326 --------- Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'routers/web/web.go')
-rw-r--r--routers/web/web.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/web/web.go b/routers/web/web.go
index 5dd7be120d..45c374e9c0 100644
--- a/routers/web/web.go
+++ b/routers/web/web.go
@@ -1277,9 +1277,10 @@ func registerRoutes(m *web.Route) {
})
m.Group("/pulls/{index}", func() {
+ m.Get("", repo.SetWhitespaceBehavior, repo.GetPullDiffStats, repo.ViewIssue)
m.Get(".diff", repo.DownloadPullDiff)
m.Get(".patch", repo.DownloadPullPatch)
- m.Get("/commits", context.RepoRef(), repo.ViewPullCommits)
+ m.Get("/commits", context.RepoRef(), repo.SetWhitespaceBehavior, repo.GetPullDiffStats, repo.ViewPullCommits)
m.Post("/merge", context.RepoMustNotBeArchived(), web.Bind(forms.MergePullRequestForm{}), repo.MergePullRequest)
m.Post("/cancel_auto_merge", context.RepoMustNotBeArchived(), repo.CancelAutoMergePullRequest)
m.Post("/update", repo.UpdatePullRequest)