|
|
|
@ -695,8 +695,8 @@ func RegisterRoutes(m *web.Route) {
|
|
|
|
|
m.Get("/{id}", repo.MilestoneIssuesAndPulls)
|
|
|
|
|
}, reqRepoIssuesOrPullsReader, context.RepoRef())
|
|
|
|
|
m.Combo("/compare/*", repo.MustBeNotEmpty, reqRepoCodeReader, repo.SetEditorconfigIfExists).
|
|
|
|
|
Get(ignSignIn, repo.SetDiffViewStyle, repo.CompareDiff).
|
|
|
|
|
Post(reqSignIn, context.RepoMustNotBeArchived(), reqRepoPullsReader, repo.MustAllowPulls, bindIgnErr(auth.CreateIssueForm{}), repo.CompareAndPullRequestPost)
|
|
|
|
|
Get(ignSignIn, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.CompareDiff).
|
|
|
|
|
Post(reqSignIn, context.RepoMustNotBeArchived(), reqRepoPullsReader, repo.MustAllowPulls, bindIgnErr(auth.CreateIssueForm{}), repo.SetWhitespaceBehavior, repo.CompareAndPullRequestPost)
|
|
|
|
|
}, context.RepoAssignment(), context.UnitTypes())
|
|
|
|
|
|
|
|
|
|
// Grouping for those endpoints that do require authentication
|
|
|
|
@ -885,7 +885,7 @@ func RegisterRoutes(m *web.Route) {
|
|
|
|
|
m.Get("/{page}", repo.Wiki)
|
|
|
|
|
m.Get("/_pages", repo.WikiPages)
|
|
|
|
|
m.Get("/{page}/_revision", repo.WikiRevision)
|
|
|
|
|
m.Get("/commit/{sha:[a-f0-9]{7,40}}", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.Diff)
|
|
|
|
|
m.Get("/commit/{sha:[a-f0-9]{7,40}}", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.Diff)
|
|
|
|
|
m.Get("/commit/{sha:[a-f0-9]{7,40}}.{:patch|diff}", repo.RawDiff)
|
|
|
|
|
|
|
|
|
|
m.Group("", func() {
|
|
|
|
@ -977,7 +977,7 @@ func RegisterRoutes(m *web.Route) {
|
|
|
|
|
|
|
|
|
|
m.Group("", func() {
|
|
|
|
|
m.Get("/graph", repo.Graph)
|
|
|
|
|
m.Get("/commit/{sha:([a-f0-9]{7,40})$}", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.Diff)
|
|
|
|
|
m.Get("/commit/{sha:([a-f0-9]{7,40})$}", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.Diff)
|
|
|
|
|
}, repo.MustBeNotEmpty, context.RepoRef(), reqRepoCodeReader)
|
|
|
|
|
|
|
|
|
|
m.Group("/src", func() {
|
|
|
|
|