mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[ci] Fix state check for purge cloud deployments (#124985)
Pull request state from GitHub returns 'OPEN' if a pull request is open. This updates the capitalization when branching from state
This commit is contained in:
parent
e7ab1e51c7
commit
9a63bb8130
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ for (const deployment of prDeployments) {
|
|||
const lastCommit = pullRequest.commits.slice(-1)[0];
|
||||
const lastCommitTimestamp = new Date(lastCommit.committedDate).getTime() / 1000;
|
||||
|
||||
if (pullRequest.state !== 'open') {
|
||||
if (pullRequest.state !== 'OPEN') {
|
||||
console.log(`Pull Request #${prNumber} is no longer open, will delete associated deployment`);
|
||||
deploymentsToPurge.push(deployment);
|
||||
} else if (!pullRequest.labels.filter((label) => label.name === 'ci:deploy-cloud')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue