diff --git a/routers/repo/branch.go b/routers/repo/branch.go index df6e0bf21f..d00f0e0602 100644 --- a/routers/repo/branch.go +++ b/routers/repo/branch.go @@ -238,6 +238,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] @@ -260,7 +261,6 @@ func loadBranches(ctx *context.Context) []*Branch { mergeMovedOn = true } } - } isIncluded := divergence.Ahead == 0 && ctx.Repo.Repository.DefaultBranch != branchName diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index 073516f25f..5244bf83e7 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -73,7 +73,7 @@ {{end}} - + {{if not .LatestPullRequest}} {{if .IsIncluded}} @@ -91,13 +91,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}}