Skip to content

Commit

Permalink
ci: make sure to exit on maitenance milestone failure (#7656)
Browse files Browse the repository at this point in the history
**Related Issue:** #7531

## Summary

The action correctly determined that it was a maintenance milestone and
[set the error
message](https://github.com/Esri/calcite-design-system/actions/runs/5988880275/job/16244580547#step:3:39).
However, it looks like
[`core.setFailed()`](https://github.com/actions/toolkit/tree/main/packages/core#exit-codes)
sets the exit code but doesn't actually exit. And then the else block
with `process.exit(0)` overrode the exit code in the next iteration.
Explicitly exiting will fix the issue.
  • Loading branch information
benelan authored Sep 1, 2023
1 parent d27471c commit 6dd8ab3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/scripts/limitPullRequestsForMaintenanceReleases.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ module.exports = async ({ github, context, core }) => {
allowedLabels,
)}.`,
);
process.exit(1)
} else {
core.notice(
"The current milestone is not for a Maintenance release, ending run.",
Expand Down

0 comments on commit 6dd8ab3

Please sign in to comment.