Skip to content

ci: report a fixed-name check for branch protection #patch - #53

Merged
nmichlo merged 5 commits into
mainfrom
ci/gate-jobs
Sep 13, 2026
Merged

nmichlo merged 5 commits into
mainfrom
ci/gate-jobs

Conversation

@nmichlo

@nmichlo nmichlo commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Adds one job per workflow whose only purpose is to report a status check with a
fixed name, so branch protection has something stable to require.

Why

Branch protection matches a required status check by name, and every name CI
produces naturally is unstable:

reusable job  ->  "lint / pre-commit"            renaming a job breaks the rule
matrix job    ->  "test (3.12)", "test (3.13)"   changing the matrix breaks it

When the required name stops being reported, the rule waits for a check that
will never arrive and every PR deadlocks. Nothing warns you; the rule just
sits there.

Before -> after

  jobs:
    pre-commit:
      uses: nmichlo/.github/.github/workflows/pre-commit.yaml@main
+
+   lint:
+     needs: [pre-commit]
+     if: always()
+     runs-on: ubuntu-latest
+     steps:
+       - env: {RESULTS: "${{ join(needs.*.result, ' ') }}"}
+         run: |
+           read -r -a outcomes <<< "${RESULTS}"
+           for outcome in "${outcomes[@]}"; do
+             [ "${outcome}" = "success" ] || exit 1
+           done

if: always() is required. Without it the gate is skipped whenever what it
guards fails -- and a skipped required check counts as success.

join(needs.*.result, ' ') collects whatever the job lists in needs, so the
same block is identical in every repo regardless of how many jobs it guards.

Result

Every repo now reports the same two checks, lint and test, whatever it runs
underneath. That is what the rulesets will require.

🤖 Generated with Claude Code

nmichlo and others added 5 commits September 13, 2026 15:36
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A repo with any file in .github/ISSUE_TEMPLATE/ suppresses ALL of the defaults from nmichlo/.github, so framework-request.md alone left disent with no bug report or feature request template at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ng them

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@nmichlo
nmichlo merged commit 841e853 into main Sep 13, 2026
8 of 10 checks passed
@nmichlo
nmichlo deleted the ci/gate-jobs branch September 13, 2026 15:19

This branch was successfully deployed

1 active deployment
pypi — f16ea2af Deployed Sep 13, 2026 by nmichlo via Publish to PyPI #3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant