diff --git a/routers/repo/branch.go b/routers/repo/branch.go index f57e76d49..93eb38481 100644 --- a/routers/repo/branch.go +++ b/routers/repo/branch.go @@ -221,6 +221,7 @@ func loadBranches(ctx *context.Context) []*Branch { } else { repoIDToRepo[pr.BaseRepoID] = pr.BaseRepo } + pr.Issue.Repo = pr.BaseRepo if pr.HasMerged { baseGitRepo, ok := repoIDToGitRepo[pr.BaseRepoID] @@ -243,7 +244,6 @@ func loadBranches(ctx *context.Context) []*Branch { mergeMovedOn = true } } - } branches[i] = &Branch{ diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index 7707b3cf1..a110d1ec6 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -73,7 +73,7 @@ {{end}} - + {{if not .LatestPullRequest}} {{if and (not .IsDeleted) $.AllowsPulls (gt .CommitsAhead 0)}} @@ -87,13 +87,13 @@ {{end}} {{else}} - #{{.LatestPullRequest.Issue.Index}} + {{if ne .LatestPullRequest.BaseRepoID .LatestPullRequest.HeadRepoID}}{{.LatestPullRequest.BaseRepo.FullName}}{{end}}#{{.LatestPullRequest.Issue.Index}} {{if .LatestPullRequest.HasMerged}} - {{$.i18n.Tr "repo.pulls.merged"}} + {{$.i18n.Tr "repo.pulls.merged"}} {{else if .LatestPullRequest.Issue.IsClosed}} - {{$.i18n.Tr "repo.issues.closed_title"}} + {{$.i18n.Tr "repo.issues.closed_title"}} {{else}} - {{$.i18n.Tr "repo.issues.open_title"}} + {{$.i18n.Tr "repo.issues.open_title"}} {{end}} {{end}}