Skip to content

Commit b219f74

Browse files
authored
chore: Allow skipped workflows (#19273)
<!-- 🎉 Thank you for making CloudQuery awesome by submitting a PR 🎉 --> #### Summary Similar to this cloudquery/cloudquery-private#4714 internal PR to allow skipped workflows <!-- Use the following steps to ensure your PR is ready to be reviewed - [ ] Read the [contribution guidelines](https://github.com/cloudquery/cloudquery/blob/main/CONTRIBUTING.md) 🧑‍🎓 - [ ] Run `make lint` to ensure the proposed changes follow the coding style 🚨 (install golangci-lint [here](https://golangci-lint.run/usage/install/#local-installation)) - [ ] Run `make test` to ensure the proposed changes pass the tests 🧪 - [ ] If changing a source plugin run `make gen` to ensure docs are up to date 📝 - [ ] Ensure the status checks below are successful ✅ --->
1 parent f7689b0 commit b219f74

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/workflows/wait_for_required_workflows.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ module.exports = async ({github, context}) => {
7575
const runsWithPossibleDuplicates = checkRuns.map(({id, name, conclusion}) => ({id, name, conclusion}))
7676
const runs = runsWithPossibleDuplicates.filter((run, index, self) => self.findIndex(({id}) => id === run.id) === index)
7777
console.log(`Got the following check runs: ${JSON.stringify(runs)}`)
78-
const matchingRuns = runs.filter(({name}) => actions.includes(name))
79-
const failedRuns = matchingRuns.filter(({conclusion}) => conclusion !== 'success')
78+
const allowedConclusions = ['success', 'skipped']
79+
const failedRuns = matchingRuns.filter(({conclusion}) => !allowedConclusions.includes(conclusion))
8080
if (failedRuns.length > 0) {
8181
throw new Error(`The following required workflows failed: ${failedRuns.map(({name}) => name).join(", ")}`)
8282
}

0 commit comments

Comments
 (0)