|
|
@@ -32,20 +32,20 @@ import ( |
|
|
|
"github.com/gogits/git-module" |
|
|
|
"github.com/gogits/go-gogs-client" |
|
|
|
|
|
|
|
"github.com/gogits/gogs/models" |
|
|
|
"github.com/gogits/gogs/modules/auth" |
|
|
|
"github.com/gogits/gogs/modules/bindata" |
|
|
|
"github.com/gogits/gogs/modules/context" |
|
|
|
"github.com/gogits/gogs/modules/log" |
|
|
|
"github.com/gogits/gogs/modules/setting" |
|
|
|
"github.com/gogits/gogs/modules/template" |
|
|
|
"github.com/gogits/gogs/routers" |
|
|
|
"github.com/gogits/gogs/routers/admin" |
|
|
|
apiv1 "github.com/gogits/gogs/routers/api/v1" |
|
|
|
"github.com/gogits/gogs/routers/dev" |
|
|
|
"github.com/gogits/gogs/routers/org" |
|
|
|
"github.com/gogits/gogs/routers/repo" |
|
|
|
"github.com/gogits/gogs/routers/user" |
|
|
|
"github.com/go-gitea/gitea/models" |
|
|
|
"github.com/go-gitea/gitea/modules/auth" |
|
|
|
"github.com/go-gitea/gitea/modules/bindata" |
|
|
|
"github.com/go-gitea/gitea/modules/context" |
|
|
|
"github.com/go-gitea/gitea/modules/log" |
|
|
|
"github.com/go-gitea/gitea/modules/setting" |
|
|
|
"github.com/go-gitea/gitea/modules/template" |
|
|
|
"github.com/go-gitea/gitea/routers" |
|
|
|
"github.com/go-gitea/gitea/routers/admin" |
|
|
|
apiv1 "github.com/go-gitea/gitea/routers/api/v1" |
|
|
|
"github.com/go-gitea/gitea/routers/dev" |
|
|
|
"github.com/go-gitea/gitea/routers/org" |
|
|
|
"github.com/go-gitea/gitea/routers/repo" |
|
|
|
"github.com/go-gitea/gitea/routers/user" |
|
|
|
) |
|
|
|
|
|
|
|
var CmdWeb = cli.Command{ |
|
|
@@ -585,12 +585,12 @@ func runWeb(ctx *cli.Context) error { |
|
|
|
m.Get("/src/*", repo.Home) |
|
|
|
m.Get("/raw/*", repo.SingleDownload) |
|
|
|
m.Get("/commits/*", repo.RefCommits) |
|
|
|
m.Get("/commit/:sha([a-z0-9]{7,40})$", repo.Diff) |
|
|
|
m.Get("/commit/:sha([a-f0-9]{7,40})$", repo.Diff) |
|
|
|
m.Get("/forks", repo.Forks) |
|
|
|
}, context.RepoRef()) |
|
|
|
m.Get("/commit/:sha([a-z0-9]{7,40})\\.:ext(patch|diff)", repo.RawDiff) |
|
|
|
m.Get("/commit/:sha([a-f0-9]{7,40})\\.:ext(patch|diff)", repo.RawDiff) |
|
|
|
|
|
|
|
m.Get("/compare/:before([a-z0-9]{7,40})\\.\\.\\.:after([a-z0-9]{7,40})", repo.CompareDiff) |
|
|
|
m.Get("/compare/:before([a-z0-9]{40})\\.\\.\\.:after([a-z0-9]{40})", repo.CompareDiff) |
|
|
|
}, ignSignIn, context.RepoAssignment(), repo.MustBeNotBare) |
|
|
|
m.Group("/:username/:reponame", func() { |
|
|
|
m.Get("/stars", repo.Stars) |
|
|
|