|
|
|
@ -584,7 +584,7 @@ func runWeb(ctx *cli.Context) error { |
|
|
|
|
|
|
|
|
|
m.Group("/pulls/:index", func() { |
|
|
|
|
m.Get("/commits", context.RepoRef(), repo.ViewPullCommits) |
|
|
|
|
m.Get("/files", context.RepoRef(), repo.SetEditorconfigIfExists, repo.ViewPullFiles) |
|
|
|
|
m.Get("/files", context.RepoRef(), repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.ViewPullFiles) |
|
|
|
|
m.Post("/merge", reqRepoWriter, repo.MergePullRequest) |
|
|
|
|
}, repo.MustAllowPulls) |
|
|
|
|
|
|
|
|
@ -592,12 +592,12 @@ func runWeb(ctx *cli.Context) error { |
|
|
|
|
m.Get("/src/*", repo.SetEditorconfigIfExists, repo.Home) |
|
|
|
|
m.Get("/raw/*", repo.SingleDownload) |
|
|
|
|
m.Get("/commits/*", repo.RefCommits) |
|
|
|
|
m.Get("/commit/:sha([a-f0-9]{7,40})$", repo.SetEditorconfigIfExists, repo.Diff) |
|
|
|
|
m.Get("/commit/:sha([a-f0-9]{7,40})$", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.Diff) |
|
|
|
|
m.Get("/forks", repo.Forks) |
|
|
|
|
}, context.RepoRef()) |
|
|
|
|
m.Get("/commit/:sha([a-f0-9]{7,40})\\.:ext(patch|diff)", repo.RawDiff) |
|
|
|
|
|
|
|
|
|
m.Get("/compare/:before([a-z0-9]{40})\\.\\.\\.:after([a-z0-9]{40})", repo.CompareDiff) |
|
|
|
|
m.Get("/compare/:before([a-z0-9]{40})\\.\\.\\.:after([a-z0-9]{40})", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.CompareDiff) |
|
|
|
|
}, ignSignIn, context.RepoAssignment(), repo.MustBeNotBare) |
|
|
|
|
m.Group("/:username/:reponame", func() { |
|
|
|
|
m.Get("/stars", repo.Stars) |
|
|
|
|