ci: report a fixed-name check for branch protection #patch - #53
Merged
Merged
Conversation
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>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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 + doneif: always()is required. Without it the gate is skipped whenever what itguards fails -- and a skipped required check counts as success.
join(needs.*.result, ' ')collects whatever the job lists inneeds, so thesame block is identical in every repo regardless of how many jobs it guards.
Result
Every repo now reports the same two checks,
lintandtest, whatever it runsunderneath. That is what the rulesets will require.
🤖 Generated with Claude Code