mirror of
https://github.com/go-gitea/gitea
synced 2025-07-13 22:17:20 +00:00
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
This commit is contained in:
committed by
Lauris BH
parent
ce7ae17b81
commit
a192f3052e
@ -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)
|
||||
|
Reference in New Issue
Block a user