Skip to content

Commit a39d505

Browse files
committed
ci(release-please): allow PAT override via RELEASE_PLEASE_TOKEN
The default GITHUB_TOKEN cannot open pull requests when the GrayCodeAI org policy keeps 'Allow GitHub Actions to create and approve pull requests' disabled. release-please creates the release branch fine but errors at PR-open. Two ways to fix: 1. Org admin flips the toggle at https://github.com/organizations/GrayCodeAI/settings/actions (permanent fix; repo-level toggle is blocked by org policy). 2. Create a PAT with repo + workflow scopes, add it as repo secret RELEASE_PLEASE_TOKEN. The workflow now picks it up automatically. This bypasses the org restriction without needing admin access. Workflow silently falls back to GITHUB_TOKEN when the secret is unset, so the change is a no-op until someone adds the PAT.
1 parent 5a04ea7 commit a39d505

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/release-please.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,13 @@ jobs:
1414
steps:
1515
- uses: googleapis/release-please-action@v4
1616
with:
17+
# The default GITHUB_TOKEN can't open PRs when the org policy
18+
# disables "Allow GitHub Actions to create and approve pull
19+
# requests". Supply a PAT via the RELEASE_PLEASE_TOKEN secret
20+
# (scopes: repo + workflow) to bypass that. If the secret is
21+
# unset we fall back to GITHUB_TOKEN and the job will still
22+
# try — it'll fail cleanly with the known 403 until either
23+
# the secret is added or the org toggle is flipped.
24+
token: ${{ secrets.RELEASE_PLEASE_TOKEN || secrets.GITHUB_TOKEN }}
1725
config-file: release-please-config.json
1826
manifest-file: .release-please-manifest.json

0 commit comments

Comments
 (0)