Skip to content

Commit ced08d1

Browse files
JulienTantlunny
authored andcommitted
fix IsPullReuqestBroken->IsPullRequestBroken (#4578)
Signed-off-by: Julien Tant <julien@craftyx.fr>
1 parent d572336 commit ced08d1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

routers/repo/pull.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ func PrepareMergedViewPullInfo(ctx *context.Context, issue *models.Issue) *git.P
264264

265265
if err != nil {
266266
if strings.Contains(err.Error(), "fatal: Not a valid object name") {
267-
ctx.Data["IsPullReuqestBroken"] = true
267+
ctx.Data["IsPullRequestBroken"] = true
268268
ctx.Data["BaseTarget"] = "deleted"
269269
ctx.Data["NumCommits"] = 0
270270
ctx.Data["NumFiles"] = 0
@@ -302,7 +302,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.PullReq
302302
}
303303

304304
if pull.HeadRepo == nil || !headGitRepo.IsBranchExist(pull.HeadBranch) {
305-
ctx.Data["IsPullReuqestBroken"] = true
305+
ctx.Data["IsPullRequestBroken"] = true
306306
ctx.Data["HeadTarget"] = "deleted"
307307
ctx.Data["NumCommits"] = 0
308308
ctx.Data["NumFiles"] = 0
@@ -313,7 +313,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.PullReq
313313
pull.BaseBranch, pull.HeadBranch)
314314
if err != nil {
315315
if strings.Contains(err.Error(), "fatal: Not a valid object name") {
316-
ctx.Data["IsPullReuqestBroken"] = true
316+
ctx.Data["IsPullRequestBroken"] = true
317317
ctx.Data["BaseTarget"] = "deleted"
318318
ctx.Data["NumCommits"] = 0
319319
ctx.Data["NumFiles"] = 0

templates/repo/issue/view_content/pull.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<a class="avatar text
33
{{if .Issue.PullRequest.HasMerged}}purple
44
{{else if .Issue.IsClosed}}grey
5-
{{else if .IsPullReuqestBroken}}red
5+
{{else if .IsPullRequestBroken}}red
66
{{else if .Issue.PullRequest.IsChecking}}yellow
77
{{else if .Issue.PullRequest.CanAutoMerge}}green
88
{{else}}red{{end}}"><span class="mega-octicon octicon-git-merge"></span></a>
@@ -22,7 +22,7 @@
2222
<div class="item text grey">
2323
{{$.i18n.Tr "repo.pulls.reopen_to_merge"}}
2424
</div>
25-
{{else if .IsPullReuqestBroken}}
25+
{{else if .IsPullRequestBroken}}
2626
<div class="item text red">
2727
<span class="octicon octicon-x"></span>
2828
{{$.i18n.Tr "repo.pulls.data_broken"}}

0 commit comments

Comments
 (0)