Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo IsPullReuqestBroken -> IsPullRequestBroken #4578

Merged
merged 1 commit into from
Aug 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions routers/repo/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func PrepareMergedViewPullInfo(ctx *context.Context, issue *models.Issue) *git.P

if err != nil {
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["NumCommits"] = 0
ctx.Data["NumFiles"] = 0
Expand Down Expand Up @@ -302,7 +302,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.PullReq
}

if pull.HeadRepo == nil || !headGitRepo.IsBranchExist(pull.HeadBranch) {
ctx.Data["IsPullReuqestBroken"] = true
ctx.Data["IsPullRequestBroken"] = true
ctx.Data["HeadTarget"] = "deleted"
ctx.Data["NumCommits"] = 0
ctx.Data["NumFiles"] = 0
Expand All @@ -313,7 +313,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.PullReq
pull.BaseBranch, pull.HeadBranch)
if err != nil {
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["NumCommits"] = 0
ctx.Data["NumFiles"] = 0
Expand Down
4 changes: 2 additions & 2 deletions templates/repo/issue/view_content/pull.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<a class="avatar text
{{if .Issue.PullRequest.HasMerged}}purple
{{else if .Issue.IsClosed}}grey
{{else if .IsPullReuqestBroken}}red
{{else if .IsPullRequestBroken}}red
{{else if .Issue.PullRequest.IsChecking}}yellow
{{else if .Issue.PullRequest.CanAutoMerge}}green
{{else}}red{{end}}"><span class="mega-octicon octicon-git-merge"></span></a>
Expand All @@ -22,7 +22,7 @@
<div class="item text grey">
{{$.i18n.Tr "repo.pulls.reopen_to_merge"}}
</div>
{{else if .IsPullReuqestBroken}}
{{else if .IsPullRequestBroken}}
<div class="item text red">
<span class="octicon octicon-x"></span>
{{$.i18n.Tr "repo.pulls.data_broken"}}
Expand Down