Skip to content

ci: "prep / prepare_release" CI failure: grant write permissions and drop GH_PUSH_TOKEN#420

Merged
sherwinski merged 2 commits into
mainfrom
copilot/fix-prep-prepare-release-job
May 15, 2026
Merged

ci: "prep / prepare_release" CI failure: grant write permissions and drop GH_PUSH_TOKEN#420
sherwinski merged 2 commits into
mainfrom
copilot/fix-prep-prepare-release-job

Conversation

Copilot AI commented May 14, 2026

Copy link
Copy Markdown
Contributor

release.yml and release-v2.yml both had permissions: contents: read, and GH_PUSH_TOKEN (owned by onesignal-deploy) was being used for git operations despite lacking write access to this repo — causing the prep / prepare_release job to fail with HTTP 403 on git push.

One Line Summary

Grant contents: write to GITHUB_TOKEN and stop passing GH_PUSH_TOKEN to reusable release workflows so github.token (github-actions[bot]) handles all git writes.

Motivation

CI failure: prep / prepare_release job (run 25891374319, job 76095096624).

remote: Permission to OneSignal/OneSignal-WordPress-Plugin.git denied to onesignal-deploy.
fatal: unable to access '...': The requested URL returned error: 403

Scope

  • Affected: .github/workflows/release.yml, .github/workflows/release-v2.yml
  • Not affected: Plugin PHP/JS/CSS code, tests, build artifacts

Changes per workflow file:

Location Before After
Top-level permissions contents: read contents: write
prep job secrets: passes GH_PUSH_TOKEN removed
bump job token: ${{ secrets.GH_PUSH_TOKEN || github.token }} ${{ github.token }}
release job secrets: passes GH_PUSH_TOKEN removed

Testing

Manual

  1. Trigger the Release (v3) workflow via workflow_dispatch with a test version — confirm prep / prepare_release creates the release branch without a 403.
  2. Confirm bump and release jobs complete successfully in sequence.

Unit / Integration

  • composer test passes locally

Affected code checklist

  • PHP plugin code (v3/)
  • v2/ legacy code
  • JS / CSS assets
  • Build / CI
  • Tests
  • Documentation (README, readme.txt, etc.)

Checklist

  • Code follows existing style in the touched files
  • Tested manually in the relevant editor(s)
    • Gutenberg/Block editor
    • Classic editor
  • No new lint or test errors introduced
  • Linear ticket / GitHub issue linked above
  • readme.txt and plugin version bumped if user-facing (release PRs only)

Copilot AI changed the title [WIP] Fix failing GitHub Actions job prep / prepare_release Fix "prep / prepare_release" CI failure: grant write permissions and drop GH_PUSH_TOKEN May 14, 2026
Copilot AI requested a review from sherwinski May 14, 2026 23:40
@sherwinski sherwinski marked this pull request as ready for review May 15, 2026 00:08
@sherwinski sherwinski changed the title Fix "prep / prepare_release" CI failure: grant write permissions and drop GH_PUSH_TOKEN chore: "prep / prepare_release" CI failure: grant write permissions and drop GH_PUSH_TOKEN May 15, 2026
@sherwinski sherwinski changed the title chore: "prep / prepare_release" CI failure: grant write permissions and drop GH_PUSH_TOKEN ci: "prep / prepare_release" CI failure: grant write permissions and drop GH_PUSH_TOKEN May 15, 2026
@sherwinski sherwinski merged commit 92a9c55 into main May 15, 2026
10 of 13 checks passed
@sherwinski sherwinski deleted the copilot/fix-prep-prepare-release-job branch May 15, 2026 00:13
sherwinski added a commit that referenced this pull request May 19, 2026
`release-v2.yml` has the same structural issue as `release.yml`: its
`release` job calls the reusable
`OneSignal/sdk-shared/.github/workflows/create-release.yml`, which runs
`gh pr create`. With only `contents: write` on the caller, the next v2
release dispatch would fail with the same
`Resource not accessible by integration (createPullRequest)` error.
Restore the v2/v3 lockstep maintained by #420 and #421.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants