mirror of
https://github.com/dolthub/dolt.git
synced 2025-12-21 11:59:41 -06:00
/.github/workflows/bump-dependency.yaml: ensure failing bumps are not autoclosed
This commit is contained in:
20
.github/workflows/bump-dependency.yaml
vendored
20
.github/workflows/bump-dependency.yaml
vendored
@@ -173,6 +173,26 @@ jobs:
|
||||
|
||||
if (pull.keepAlive) process.exit(0);
|
||||
|
||||
const checkSuiteRes = await github.rest.checks.listSuitesForRef({
|
||||
owner,
|
||||
repo,
|
||||
ref: pull.headRef,
|
||||
});
|
||||
|
||||
if (checkSuiteRes.data) {
|
||||
for (const suite of checkSuiteRes.data.check_suites) {
|
||||
console.log("suite id:", suite.id);
|
||||
console.log("suite app slug:", suite.app.slug);
|
||||
console.log("suite status:", suite.status);
|
||||
console.log("suite conclusion:", suite.conclusion);
|
||||
if (suite.app.slug === "github-actions") {
|
||||
if (suite.status !== "completed" || suite.conclusion !== "success") {
|
||||
console.log(`Leaving pr open due to status:${suite.status} conclusion${suite.conclusion}`);
|
||||
process.exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
console.log(`Closing open pr ${pull.number}`);
|
||||
await github.rest.issues.createComment({
|
||||
issue_number: pull.number,
|
||||
|
||||
Reference in New Issue
Block a user