diff options
author | Julien Tant <julien@craftyx.fr> | 2018-08-01 05:00:35 +0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2018-08-01 11:00:35 +0800 |
commit | ced08d18a40b71cf4a290d9795280c2ef79e168f (patch) | |
tree | 3af4f03b5f15f67c900e0d8e46fad136819bb368 | |
parent | d57233680b71925f3812be885df479bb98cddf9c (diff) | |
download | gitea-ced08d18a40b71cf4a290d9795280c2ef79e168f.tar.gz gitea-ced08d18a40b71cf4a290d9795280c2ef79e168f.zip |
fix IsPullReuqestBroken->IsPullRequestBroken (#4578)
Signed-off-by: Julien Tant <julien@craftyx.fr>
-rw-r--r-- | routers/repo/pull.go | 6 | ||||
-rw-r--r-- | templates/repo/issue/view_content/pull.tmpl | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/routers/repo/pull.go b/routers/repo/pull.go index c8d65731ee..1d7747450b 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -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 @@ -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 @@ -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 diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl index d4bf5a3277..9c9dd290a3 100644 --- a/templates/repo/issue/view_content/pull.tmpl +++ b/templates/repo/issue/view_content/pull.tmpl @@ -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> @@ -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"}} |