diff options
author | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-03-24 18:25:15 +0800 |
---|---|---|
committer | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-03-24 18:25:15 +0800 |
commit | 137538e54b3aade46cf2ef947707f4e32ba8a382 (patch) | |
tree | a566f2140eee58e06b4dc41712fc188adcdec4fc /routers/repo/pull.go | |
parent | b9b82cfe477bcbfd3541adfc969ff20210d56549 (diff) | |
download | gitea-137538e54b3aade46cf2ef947707f4e32ba8a382.tar.gz gitea-137538e54b3aade46cf2ef947707f4e32ba8a382.zip |
refactor repo.go
Diffstat (limited to 'routers/repo/pull.go')
-rw-r--r-- | routers/repo/pull.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/routers/repo/pull.go b/routers/repo/pull.go new file mode 100644 index 0000000000..d4a12a4a83 --- /dev/null +++ b/routers/repo/pull.go @@ -0,0 +1,20 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "github.com/codegangsta/martini" + "github.com/gogits/gogs/modules/middleware" +) + +func Pulls(ctx *middleware.Context, params martini.Params) { + ctx.Data["IsRepoToolbarPulls"] = true + if len(params["branchname"]) == 0 { + params["branchname"] = "master" + } + + ctx.Data["Branchname"] = params["branchname"] + ctx.HTML(200, "repo/pulls") +} |