[CI] Always set checkoutInfo after git checkout (#99265) (#99294)

Co-authored-by: Brian Seeders <brian.seeders@elastic.co>
This commit is contained in:
Kibana Machine 2021-05-04 21:24:05 -04:00 committed by GitHub
parent 1870be1022
commit 7d46d7c93f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,10 +79,12 @@ def base(Map params, Closure closure) {
dir("kibana") {
checkoutInfo = getCheckoutInfo()
// use `checkoutInfo` as a flag to indicate that we've already reported the pending commit status
if (buildState.get('shouldSetCommitStatus') && !buildState.has('checkoutInfo')) {
if (!buildState.has('checkoutInfo')) {
buildState.set('checkoutInfo', checkoutInfo)
githubCommitStatus.onStart()
if (buildState.get('shouldSetCommitStatus')) {
githubCommitStatus.onStart()
}
}
}