pull.go 521 B

123456789101112131415161718192021
  1. // Copyright 2014 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package repo
  5. import (
  6. "github.com/codegangsta/martini"
  7. "github.com/gogits/gogs/modules/middleware"
  8. )
  9. func Pulls(ctx *middleware.Context, params martini.Params) {
  10. ctx.Data["IsRepoToolbarPulls"] = true
  11. if len(params["branchname"]) == 0 {
  12. params["branchname"] = "master"
  13. }
  14. ctx.Data["Branchname"] = params["branchname"]
  15. ctx.HTML(200, "repo/pulls")
  16. }