Skip to content

Commit c62a6b7

Browse files
committed
#2014 allow switch branches between two orgs in compose PR
1 parent cadf03d commit c62a6b7

File tree

6 files changed

+8
-5
lines changed

6 files changed

+8
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra
33

44
![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true)
55

6-
##### Current version: 0.8.11
6+
##### Current version: 0.8.12
77

88
| Web | UI | Preview |
99
|:-------------:|:-------:|:-------:|

gogs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"github.com/gogits/gogs/modules/setting"
1818
)
1919

20-
const APP_VER = "0.8.11.1219"
20+
const APP_VER = "0.8.12.1219"
2121

2222
func init() {
2323
runtime.GOMAXPROCS(runtime.NumCPU())

modules/middleware/context.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ func (ctx *Context) HasValue(name string) bool {
125125

126126
// HTML calls Context.HTML and converts template name to string.
127127
func (ctx *Context) HTML(status int, name base.TplName) {
128+
log.Debug("Template: %s", name)
128129
ctx.Context.HTML(status, string(name))
129130
}
130131

@@ -241,6 +242,7 @@ func Contexter() macaron.Handler {
241242

242243
ctx.Data["CsrfToken"] = x.GetToken()
243244
ctx.Data["CsrfTokenHtml"] = template.HTML(`<input type="hidden" name="_csrf" value="` + x.GetToken() + `">`)
245+
log.Debug("CSRF Token: %v | %v", ctx.Data["CsrfToken"], ctx.GetCookie("_csrf"))
244246

245247
ctx.Data["ShowRegistrationButton"] = setting.Service.ShowRegistrationButton
246248
ctx.Data["ShowFooterBranding"] = setting.ShowFooterBranding

routers/repo/pull.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ func ParseCompareInfo(ctx *middleware.Context) (*models.User, *models.Repository
431431
}
432432
return nil, nil, nil, nil, "", ""
433433
}
434+
ctx.Data["HeadUser"] = headUser
434435

435436
repo := ctx.Repo.Repository
436437

templates/.VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.8.11.1219
1+
0.8.12.1219

templates/repo/pulls/compare.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</div>
2222
<div class="scrolling menu">
2323
{{range .Branches}}
24-
<div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{.}}...{{$.SignedUser.Name}}:{{$.HeadBranch}}">{{.}}</div>
24+
<div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{.}}...{{$.HeadUser.Name}}:{{$.HeadBranch}}">{{.}}</div>
2525
{{end}}
2626
</div>
2727
</div>
@@ -39,7 +39,7 @@
3939
</div>
4040
<div class="scrolling menu">
4141
{{range .HeadBranches}}
42-
<div class="{{if eq $.HeadBranch .}}selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{$.BaseBranch}}...{{$.SignedUser.Name}}:{{.}}">{{.}}</div>
42+
<div class="{{if eq $.HeadBranch .}}selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{$.BaseBranch}}...{{$.HeadUser.Name}}:{{.}}">{{.}}</div>
4343
{{end}}
4444
</div>
4545
</div>

0 commit comments

Comments
 (0)