summaryrefslogtreecommitdiffstats
path: root/cmd/web.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-08 22:43:14 +0800
committerUnknwon <u@gogs.io>2015-08-08 22:43:14 +0800
commitdea3a8c6a42ea7e4921c0e4beee5d4fd0437dbe5 (patch)
tree773b28a72cee24e4a02f3d162de8a37a8f912f59 /cmd/web.go
parentd015d951bd6959f9585d8a83acfe7bba07b7eaad (diff)
downloadgitea-dea3a8c6a42ea7e4921c0e4beee5d4fd0437dbe5.tar.gz
gitea-dea3a8c6a42ea7e4921c0e4beee5d4fd0437dbe5.zip
WIP: create PR - choose branch
Diffstat (limited to 'cmd/web.go')
-rw-r--r--cmd/web.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 850dc84b51..2c931a59ba 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -449,6 +449,8 @@ func runWeb(ctx *cli.Context) {
m.Get("/edit/:tagname", repo.EditRelease)
m.Post("/edit/:tagname", bindIgnErr(auth.EditReleaseForm{}), repo.EditReleasePost)
}, reqRepoAdmin, middleware.RepoRef())
+
+ m.Combo("/compare/*").Get(repo.CompareAndPullRequest)
}, reqSignIn, middleware.RepoAssignment(true))
m.Group("/:username/:reponame", func() {
@@ -469,7 +471,7 @@ func runWeb(ctx *cli.Context) {
m.Get("/commit/*", repo.Diff)
}, middleware.RepoRef())
- m.Get("/compare/:before([a-z0-9]+)...:after([a-z0-9]+)", repo.CompareDiff)
+ m.Get("/compare/:before([a-z0-9]{40})...:after([a-z0-9]{40})", repo.CompareDiff)
}, ignSignIn, middleware.RepoAssignment(true))
m.Group("/:username", func() {