fix IsPullReuqestBroken->IsPullRequestBroken (#4578)
Signed-off-by: Julien Tant <julien@craftyx.fr>
This commit is contained in:
parent
d57233680b
commit
ced08d18a4
2 changed files with 5 additions and 5 deletions
|
@ -264,7 +264,7 @@ func PrepareMergedViewPullInfo(ctx *context.Context, issue *models.Issue) *git.P
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if strings.Contains(err.Error(), "fatal: Not a valid object name") {
|
if strings.Contains(err.Error(), "fatal: Not a valid object name") {
|
||||||
ctx.Data["IsPullReuqestBroken"] = true
|
ctx.Data["IsPullRequestBroken"] = true
|
||||||
ctx.Data["BaseTarget"] = "deleted"
|
ctx.Data["BaseTarget"] = "deleted"
|
||||||
ctx.Data["NumCommits"] = 0
|
ctx.Data["NumCommits"] = 0
|
||||||
ctx.Data["NumFiles"] = 0
|
ctx.Data["NumFiles"] = 0
|
||||||
|
@ -302,7 +302,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.PullReq
|
||||||
}
|
}
|
||||||
|
|
||||||
if pull.HeadRepo == nil || !headGitRepo.IsBranchExist(pull.HeadBranch) {
|
if pull.HeadRepo == nil || !headGitRepo.IsBranchExist(pull.HeadBranch) {
|
||||||
ctx.Data["IsPullReuqestBroken"] = true
|
ctx.Data["IsPullRequestBroken"] = true
|
||||||
ctx.Data["HeadTarget"] = "deleted"
|
ctx.Data["HeadTarget"] = "deleted"
|
||||||
ctx.Data["NumCommits"] = 0
|
ctx.Data["NumCommits"] = 0
|
||||||
ctx.Data["NumFiles"] = 0
|
ctx.Data["NumFiles"] = 0
|
||||||
|
@ -313,7 +313,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.PullReq
|
||||||
pull.BaseBranch, pull.HeadBranch)
|
pull.BaseBranch, pull.HeadBranch)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if strings.Contains(err.Error(), "fatal: Not a valid object name") {
|
if strings.Contains(err.Error(), "fatal: Not a valid object name") {
|
||||||
ctx.Data["IsPullReuqestBroken"] = true
|
ctx.Data["IsPullRequestBroken"] = true
|
||||||
ctx.Data["BaseTarget"] = "deleted"
|
ctx.Data["BaseTarget"] = "deleted"
|
||||||
ctx.Data["NumCommits"] = 0
|
ctx.Data["NumCommits"] = 0
|
||||||
ctx.Data["NumFiles"] = 0
|
ctx.Data["NumFiles"] = 0
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<a class="avatar text
|
<a class="avatar text
|
||||||
{{if .Issue.PullRequest.HasMerged}}purple
|
{{if .Issue.PullRequest.HasMerged}}purple
|
||||||
{{else if .Issue.IsClosed}}grey
|
{{else if .Issue.IsClosed}}grey
|
||||||
{{else if .IsPullReuqestBroken}}red
|
{{else if .IsPullRequestBroken}}red
|
||||||
{{else if .Issue.PullRequest.IsChecking}}yellow
|
{{else if .Issue.PullRequest.IsChecking}}yellow
|
||||||
{{else if .Issue.PullRequest.CanAutoMerge}}green
|
{{else if .Issue.PullRequest.CanAutoMerge}}green
|
||||||
{{else}}red{{end}}"><span class="mega-octicon octicon-git-merge"></span></a>
|
{{else}}red{{end}}"><span class="mega-octicon octicon-git-merge"></span></a>
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
<div class="item text grey">
|
<div class="item text grey">
|
||||||
{{$.i18n.Tr "repo.pulls.reopen_to_merge"}}
|
{{$.i18n.Tr "repo.pulls.reopen_to_merge"}}
|
||||||
</div>
|
</div>
|
||||||
{{else if .IsPullReuqestBroken}}
|
{{else if .IsPullRequestBroken}}
|
||||||
<div class="item text red">
|
<div class="item text red">
|
||||||
<span class="octicon octicon-x"></span>
|
<span class="octicon octicon-x"></span>
|
||||||
{{$.i18n.Tr "repo.pulls.data_broken"}}
|
{{$.i18n.Tr "repo.pulls.data_broken"}}
|
||||||
|
|
Loading…
Reference in a new issue