Report strict job outcomes as commit statuses so they show in the merge box#951
Merged
Merged
Conversation
Check runs created with the Actions token get attached to the oldest github-actions check suite for the head SHA, and the PR merge box renders only the newest suite per workflow, so on any PR with more than one CI run (any push or close/reopen) the strict-status check was invisible in the merge box even though it appeared on the Checks tab. Commit statuses attach directly to the SHA and always render in the merge box (same mechanism codecov uses). The statuses API has no neutral state, so an expected failure is reported as success with a description saying so; an infra error reports as error. Claude-Session: https://claude.ai/code/session_01M5FNYqVHbKLbVSGJGftLrL
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.
Follow-up to #950, which turned out to be necessary but not sufficient. Post-merge verification on #948 showed the renamed
strict-status / ubuntu-py313-strictcheck run was created and appears on the Checks tab, but still not in the merge box. Root cause: check runs created with the ActionsGITHUB_TOKENget attached to the oldest github-actions check suite for the head SHA, and the merge box renders only the newest suite per workflow. Every push or close/reopen creates a new CI check suite, so on any PR with more than one CI run the strict-status check lands in a stale suite and is invisible in the merge box (#948's merge box reports "1 skipped check, 16 successful checks" with no neutral entry, while the check-runs API shows the strict-status checks stuck in the 20:07 suite alongside three newer CI suites).This switches the reporter from check runs to commit statuses (
strict-status/<matrix name>context), which attach directly to the SHA and always render in the merge box — the same mechanism codecov'scodecov/patch/codecov/projectentries use. The statuses API has noneutralstate, so the mapping is:The
target_urllinks each status to the CI run. Workflow permission changes fromchecks: writetostatuses: write.As before,
workflow_runworkflows execute from the default branch, so this takes effect after merging; re-verify by re-triggering CI on an open PR and confirming astrict-status/ubuntu-py313-strictline appears in the merge-box check list.🤖 Generated with Claude Code
https://claude.ai/code/session_01M5FNYqVHbKLbVSGJGftLrL