fix(release): auth release push with RELEASE_PAT for auto-merge#98
Merged
fix(release): auth release push with RELEASE_PAT for auto-merge#98
Conversation
GITHUB_TOKEN-authored pushes don't fire downstream workflows, so pr-validation.yml never runs on the release PR and `gh pr merge --auto` stays stuck at mergeStateStatus=CLEAN forever. Re-auth origin with an org-scoped RELEASE_PAT before push + PR create. Falls back to GITHUB_TOKEN so existing release runs keep working until the secret is configured.
Contributor
|
🎉 PR Validation ✅ PASSED Commit: Checks:
Ready to merge! ✨ 🔗 View workflow run |
vreshch
added a commit
that referenced
this pull request
Apr 15, 2026
PR #98 wired RELEASE_PAT as the preferred token, falling back to GITHUB_TOKEN. Since RELEASE_PAT is not configured in this org yet, the fallback resolves to GITHUB_TOKEN — same stuck behavior we set out to fix. PAT_TOKEN (created 2026-01-25) is already an org secret. Wire it as the middle-tier fallback so auto-merge works today; RELEASE_PAT still takes precedence when a dedicated release PAT is added later.
vreshch
added a commit
that referenced
this pull request
Apr 15, 2026
## Summary #98 wired `RELEASE_PAT` as the preferred token with `GITHUB_TOKEN` fallback. Since `RELEASE_PAT` is not yet configured, the fallback resolves to `GITHUB_TOKEN` — the same workflow-suppressing behavior we set out to fix. Auto-merge is still stuck. Both repos already have an org-level `PAT_TOKEN` secret (created 2026-01-25). Wire it as the middle-tier fallback: `RELEASE_PAT || PAT_TOKEN || GITHUB_TOKEN`. Auto-merge starts working today with zero new secrets, and `RELEASE_PAT` remains the preferred slot for a release-scoped PAT later. ## Scope follow-up (nice-to-have, not blocking) `PAT_TOKEN` may be broader than a release flow strictly needs. After this lands: - Create a fine-grained PAT scoped to `contents:write` + `pull_requests:write` - Add as org secret `RELEASE_PAT` - Workflow picks it up automatically (first in the fallback chain) — no further code change ## Validation Next release after merge: `gh workflow run release-prepare.yml -f bump_type=patch -f packages=core,platform -f auto_merge=true` should 1. Push the release branch under `PAT_TOKEN` credentials 2. Fire `pr-validation.yml` automatically 3. Auto-merge when validation passes 4. Trigger `publish.yml` on merge Paired PR in `agentage/cli` with the identical change.
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
Every release PR currently needs a manual
gh pr merge <N> --squash(confirmed on v0.14.0, 2026-04-09). Root cause:GITHUB_TOKEN-authored pushes are suppressed from triggering downstream workflows (GitHub prevents recursion), sopr-validation.ymlnever fires on the release branch, andgh pr merge --autowaits forever atmergeStateStatus=CLEANfor a state change.Fix
Re-auth
originwith an org-scopedRELEASE_PATbefore the release push + PR create. With a PAT, the push is authored by a real user and downstream workflows fire normally. Auto-merge then completes when validation passes.Graceful fallback:
${{ secrets.RELEASE_PAT || secrets.GITHUB_TOKEN }}. If the secret is not set, the workflow behaves exactly as before — zero regression risk until the PAT lands.Required follow-up (org admin, one-time)
reposcope, OR fine-grained withcontents:write+pull_requests:write)RELEASE_PATforagentage/cli+agentage/agentkitValidation plan
After the PAT is configured, running
gh workflow run release-prepare.yml -f bump_type=patch -f packages=core,platform -f auto_merge=trueshould:pr-validation.ymlautomatically (currently never fires on release PRs)publish.ymlon mergePaired PR in
agentage/cliwith the same change.