ci: fail gha-done when a required job fails or is cancelled - #2018
claude[bot] wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rx13DJRnFBvVNh1ioMMXsQ
|
Three test jobs failed on f5a02da, and none of the failures come from this PR:
All three jobs fail the same 3 tests in Why it isn't this PR: the only file changed here is Fix: I didn't find an open PR or issue that fixes this. Generated by Claude Code |
There was a problem hiding this comment.
Looks good, straightforward CI config fix. Reviewed the changed if condition on the "GitHub Actions Completed" job and the new "Fail if any required job failed or was cancelled" step — the job now always runs but explicitly exits 1 (via env-passed needs.test.result/needs.build.result, avoiding direct expression interpolation into the shell script) when a dependency failed or was cancelled, and the job id/name/needs are unchanged so it should keep matching existing branch-protection rules.
Extended reasoning...
The diff touches only .github/workflows/ci.yml, changing the completion gate job's if condition and adding one step that fails the job when the test or build job failed/was cancelled. No secrets or untrusted input are involved; job results are passed via env: rather than interpolated directly into the run script, avoiding shell-injection concerns. The repo-wide CODEOWNERS (@ electron/wg-ecosystem, @ codebytere) covers this path but the change is small, mechanical, and matches its stated intent exactly, with no bug-hunter findings and no unresolved reviewer objections in the timeline.
Requested by Samuel Attard · Slack thread
The gha-done job ("GitHub Actions Completed") used
if: always() && !contains(needs.*.result, 'failure'), so when test or build failed the gate job was skipped rather than failed, and a skipped required check counts as passing; cancelled runs were not caught either. This changes gha-done to always run and adds a step that fails if test or build failed or were cancelled, matching the required-ci logic in electron/forge. The job id, name and needs are unchanged, so the existing ruleset check name keeps matching.🤖 Generated with Claude Code
https://claude.ai/code/session_01Rx13DJRnFBvVNh1ioMMXsQ
Generated by Claude Code