Improve patch:
This commit is contained in:
parent
a8238a5bc5
commit
119b9f5599
@ -431,7 +431,15 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.Compare
|
||||
|
||||
if pull.HeadRepo == nil || !headBranchExist || headBranchSha != sha {
|
||||
ctx.Data["IsPullRequestBroken"] = true
|
||||
ctx.Data["HeadTarget"] = "deleted"
|
||||
if pull.IsSameRepo() {
|
||||
ctx.Data["HeadTarget"] = pull.HeadBranch
|
||||
} else {
|
||||
if pull.HeadRepo == nil {
|
||||
ctx.Data["HeadTarget"] = "<deleted>:" + pull.HeadBranch
|
||||
} else {
|
||||
ctx.Data["HeadTarget"] = pull.HeadRepo.OwnerName + ":" + pull.HeadBranch
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
compareInfo, err := baseGitRepo.GetCompareInfo(pull.BaseRepo.RepoPath(),
|
||||
|
@ -37,14 +37,13 @@
|
||||
<span class="pull-desc">{{$.i18n.Tr "repo.pulls.merged_title_desc" .NumCommits .HeadTarget .BaseTarget $mergedStr | Str2html}}</span>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<span id="pull-desc" class="pull-desc">
|
||||
{{if .Issue.OriginalAuthor }}
|
||||
<span id="pull-desc" class="pull-desc">{{.Issue.OriginalAuthor}} {{$.i18n.Tr "repo.pulls.title_desc" .NumCommits .HeadTarget .BaseTarget | Str2html}}</span>
|
||||
{{.Issue.OriginalAuthor}}
|
||||
{{else}}
|
||||
<span id="pull-desc" class="pull-desc">
|
||||
<a {{if gt .Issue.Poster.ID 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.GetDisplayName}}</a>
|
||||
{{$.i18n.Tr "repo.pulls.title_desc" .NumCommits .HeadTarget .BaseTarget | Str2html}}
|
||||
</span>
|
||||
<a{{if gt .Issue.Poster.ID 0}} href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.GetDisplayName}}</a>
|
||||
{{end}}
|
||||
{{$.i18n.Tr "repo.pulls.title_desc" .NumCommits .HeadTarget .BaseTarget | Str2html}}</span>
|
||||
<span id="pull-desc-edit" style="display: none">
|
||||
<div class="ui floating filter dropdown">
|
||||
<div class="ui basic small button">
|
||||
|
Loading…
Reference in New Issue
Block a user