ci: stamp release-please PR required checks via the checks API - #55
Merged
Conversation
Dispatching CI onto the release-please branch (#54) never reported the required checks: prs_created is false on changelog-neutral pushes so the dispatch step skipped, and even unguarded it would fail because the release branch is only rebuilt when the changelog changes, so its stale ci.yml lacks the workflow_dispatch trigger. Instead, the release workflow now creates the test/npm/deny check runs directly via the Checks API with GITHUB_TOKEN. Only GitHub Apps can create check runs, and GITHUB_TOKEN is the Actions app's token, so the stamps satisfy the ruleset's app-pinned contexts; a 'skipped' conclusion counts as passing. This has zero dependence on release-please outputs, the branch's file contents, or workflow triggers.
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.
Why
Round 1 (#54) tried to unstick the release-please PR by dispatching
ci.ymlonto the release branch. Two failure points, both confirmed on the post-merge run:if: prs_created == 'true', but aci:commit doesn't change the changelog, so release-please logged "PR remained the same" andprs_createdwasfalse.gh workflow run ci.yml --ref <branch>requires the workflow file at that ref to contain theworkflow_dispatchtrigger. The release-please branch is only rebuilt when the changelog changes, so it still carries the pre-ci: dispatch CI onto release-please PRs so required checks report #54ci.ymlwith noworkflow_dispatch— any main push that doesn't update the release PR leaves the branch stale and the dispatch broken.The fix
The release workflow now creates the
test/npm/denycheck runs directly via the Checks API. Only GitHub Apps can create check runs, andGITHUB_TOKENis the Actions app's installation token, so the stamps are attributed to that app and satisfy the ruleset's app-pinned required contexts; askippedconclusion counts as passing (the same conclusion the self-skipping jobs already reported on 0.7.0/0.8.0). This has zero dependence on release-please outputs, the branch's file contents, or workflow triggers.The
workflow_dispatchtrigger and theref_nameskip guards inci.ymlstay for manual runs; a normal branch PR still runs the full suite as its required checks.