aboutsummaryrefslogtreecommitdiffstats
path: root/routers/routes
diff options
context:
space:
mode:
authorSandro Santilli <strk@kbt.io>2018-01-05 11:56:52 +0100
committerLauris BH <lauris@nix.lv>2018-01-05 12:56:52 +0200
commita192f3052ed9b59d1404fdcebf2b5c156d6d6969 (patch)
treed955279b81ab5de792158f0f131a23a7837c1e57 /routers/routes
parentce7ae17b81220434af13fd048e44899bbd7d9e72 (diff)
downloadgitea-a192f3052ed9b59d1404fdcebf2b5c156d6d6969.tar.gz
gitea-a192f3052ed9b59d1404fdcebf2b5c156d6d6969.zip
Serve pull request .diff files (#3293)
* Serve pull request .diff files Closes #3259 * Add test for pull request redirection and .diff access * Typo * There's no need to test for pr.BaseRepo being nil after calling GetBaseRepo
Diffstat (limited to 'routers/routes')
-rw-r--r--routers/routes/routes.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/routes/routes.go b/routers/routes/routes.go
index cdbbd22801..4293cca6c9 100644
--- a/routers/routes/routes.go
+++ b/routers/routes/routes.go
@@ -624,6 +624,7 @@ func RegisterRoutes(m *macaron.Macaron) {
}, repo.MustBeNotBare, context.RepoRef(), context.CheckUnit(models.UnitTypeCode))
m.Group("/pulls/:index", func() {
+ m.Get(".diff", repo.DownloadPullDiff)
m.Get("/commits", context.RepoRef(), repo.ViewPullCommits)
m.Get("/files", context.RepoRef(), repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.ViewPullFiles)
m.Post("/merge", reqRepoWriter, repo.MergePullRequest)