Repository navigation
fix(workflows): move floating tags via git push with explicit App token - #1379
Merged
Merged
Conversation
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.
Summary
The
floating-tagsjob in the scaffoldedpromote-release.ymlcreated brand-newfloating levels via
POST /git/refs— the one ref-mutation path where GitHubdoes not honor the Release App's Integration ruleset bypass for the
creationrule. The first release of every new<prefix>X/<prefix>X.Ylevel therefore died with the opaque
Reference does not exist(HTTP 422) andno rule-suite entry at all, despite the App holding an
alwaysbypass on thewhole Tag ruleset (hit live on
commit-action0.3.1 andsync-issues-action0.5.0).
move_tag()now mutates floating tags viagit push --force "${TARGET_SHA}:refs/tags/${name}"— the exact pathrelease-publish.ymlalready uses to create the release tags, empiricallyproven to be bypassed — with the App installation token plumbed explicitly
into the push URL (
https://x-access-token:${GH_TOKEN}@github.com/...).Checkout's persisted credentials are deliberately not relied on: those are the
default
github.token, which has no bypass. Create and move collapse into onebranch-free path.
Preserved from #1157/#1158
gh apiGET + skip-when-already-at-target guard stays,so re-runs are safe.
::errorannotation +docs/MIGRATION.md#first-release-floating-tagsfallback stays for pushes that fail for otherreasons; its wording is updated now that the "grant a creation bypass"
remediation is moot (the bypass already exists — the REST create path simply
ignores it) and points at verifying the ruleset bypass list and the
RELEASE_APP_CLIENT_ID/RELEASE_APP_PRIVATE_KEYsecrets instead.instead of
POST /git/refs, so the REST path is not reintroduced.Changes
assets/workspace/.github/workflows/promote-release.yml— push-basedmove_tag(), explicit-token remote URL, and agit fetchof the release tagso the peeled commit object is available locally to push (the checkout is a
shallow clone of the workflow head, which need not contain it).
tests/test_floating_tags.py— new shape tests pin the push path, theexplicit token, the absence of REST ref mutation, the surviving idempotence
guard, and the updated annotation (TDD: committed failing first).
docs/MIGRATION.md— the promote-release: first-time floating minor/major tag creation fails (422 on POST /git/refs) after publish+merge #1157 steady-state note now describes the RESTbypass asymmetry, scopes the one-off remediation to pre-fix devkit versions,
and recommends upgrading.
CHANGELOG.md(+ synced workspace mirror) — Fixed entry under Unreleased.Verification
uv run pytest tests/test_floating_tags.py— 9 passed (3 new tests failedRED before the fix).
uv run pytest tests(minus image/integration, which need a built image) —483 passed; the single failure (
test_flake_hookspymarkdownCONTRIBUTE.md/CONTRIBUTING.mdexclude drift) pre-exists ondevfrom the[DOCS] Community profile: rename CONTRIBUTE.md to CONTRIBUTING.md and add CODE_OF_CONDUCT.md #1372 rename and is untouched by this PR (separate issue to follow).
just precommit(fullprek run --all-files) — all green.just test-bats— full suite green, including the rendered-workflowactionlint checks over
promote-release.yml(Adopt actionlint for authored and per-mode rendered workflow templates #995).issue's acceptance criteria.
Out of scope, per the issue: reporting the
POST /git/refsbypass asymmetryupstream, the optional org-config
exempt-mode hardening, and shrinking theMIGRATION.md runbook to a historical note.
Closes #1377