summaryrefslogtreecommitdiffstats
path: root/routers/repo
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-01-22 11:46:04 +0800
committerGitHub <noreply@github.com>2020-01-22 11:46:04 +0800
commit81daf26878d8a7e14c172fc39fc55c36281b1898 (patch)
tree9d4d43bf2e12cdc9c56196938d0618e9577cd1b6 /routers/repo
parentcca13ae2acf1ef7a3b0516a8774dff0365b73697 (diff)
downloadgitea-81daf26878d8a7e14c172fc39fc55c36281b1898.tar.gz
gitea-81daf26878d8a7e14c172fc39fc55c36281b1898.zip
Fix wrong hint when status checking is running on pull request view (#9886)
* Fix wrong hint when status checking is running on pull request view * fix lint * fix test * fix test * fix wrong tmpl * fix import * rename function name
Diffstat (limited to 'routers/repo')
-rw-r--r--routers/repo/pull.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/routers/repo/pull.go b/routers/repo/pull.go
index f6397096e2..c84174783a 100644
--- a/routers/repo/pull.go
+++ b/routers/repo/pull.go
@@ -417,7 +417,9 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.Compare
}
return false
}
- ctx.Data["IsRequiredStatusCheckSuccess"] = pull_service.IsCommitStatusContextSuccess(commitStatuses, pull.ProtectedBranch.StatusCheckContexts)
+ state := pull_service.MergeRequiredContextsCommitStatus(commitStatuses, pull.ProtectedBranch.StatusCheckContexts)
+ ctx.Data["RequiredStatusCheckState"] = state
+ ctx.Data["IsRequiredStatusCheckSuccess"] = state.IsSuccess()
}
ctx.Data["HeadBranchMovedOn"] = headBranchSha != sha