summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Tant <julien@craftyx.fr>2018-08-01 05:00:35 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2018-08-01 11:00:35 +0800
commitced08d18a40b71cf4a290d9795280c2ef79e168f (patch)
tree3af4f03b5f15f67c900e0d8e46fad136819bb368
parentd57233680b71925f3812be885df479bb98cddf9c (diff)
downloadgitea-ced08d18a40b71cf4a290d9795280c2ef79e168f.tar.gz
gitea-ced08d18a40b71cf4a290d9795280c2ef79e168f.zip
fix IsPullReuqestBroken->IsPullRequestBroken (#4578)
Signed-off-by: Julien Tant <julien@craftyx.fr>
-rw-r--r--routers/repo/pull.go6
-rw-r--r--templates/repo/issue/view_content/pull.tmpl4
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"}}