Repository navigation
fix(release): approve the Version Packages PR's parked runs instead of dispatching CI - #66
Merged
Merged
Conversation
…f dispatching CI GitHub parks the version PR's pull_request runs (CI, CodeQL) as action_required because github-actions[bot] opened it. Dispatching CI satisfied the all-checks rule but never produced the CodeQL result, so the PR stayed blocked. Approve the parked runs with GITHUB_TOKEN (actions: write) instead, fail-soft, and drop the ci-workflow input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: unional <homawong@gmail.com>
|
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
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
changesets/action opens the "version packages" PR with
GITHUB_TOKEN, so its author isgithub-actions[bot]. GitHub creates the PR'spull_requestruns (CI and CodeQL) but parks them with conclusionaction_requireduntil someone approves them. Theworkflow_dispatchof CI added earlier satisfies thecode / all-checksrule but never produces the CodeQLcode_scanningresult, so the PR stays BLOCKED.What
The "Start CI on the version packages PR" step is replaced by "Approve the version packages PR's pending runs":
changeset-release/<ref_name>and lists that branch's runs at that SHA whose conclusion isaction_requiredor whose status iswaiting/action_required. It polls for up to about 60s while GitHub creates them, then lists once more to catch workflows created later.POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve.::warning::that names the cause, and a 403 points at the caller'sactions: writegrant.ci-workflowinput and the dispatch are gone. Callers'workflow_dispatch:on their CI workflow is now unnecessary but harmless. The headers say so.Verification
GITHUB_TOKENagainst the approve endpoint in a throwaway repo, where a workflow opened a PR withGITHUB_TOKEN:actions: write, the parked runs were approved (201 Created) and went fromaction_requiredtosuccess. This covered two workflows on achangeset-release/…branch, so slashes in the branch name work.actions: read, the approve call returned403 Resource not accessible by integration. The step printed theactions: writewarning and the job still passed.actions/*@v3pins that this PR does not touch.with: ci-workflow:and found none.🤖 Generated with Claude Code