ci: "prep / prepare_release" CI failure: grant write permissions and drop GH_PUSH_TOKEN#420
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/OneSignal/OneSignal-WordPress-Plugin/sessions/38b59a20-677b-48e1-8b9d-52ecb928681a Co-authored-by: sherwinski <15919091+sherwinski@users.noreply.github.com>
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
sherwinski
approved these changes
May 15, 2026
fadi-george
approved these changes
May 15, 2026
14 tasks
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.
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.
release.ymlandrelease-v2.ymlboth hadpermissions: contents: read, andGH_PUSH_TOKEN(owned byonesignal-deploy) was being used for git operations despite lacking write access to this repo — causing theprep / prepare_releasejob to fail with HTTP 403 ongit push.One Line Summary
Grant
contents: writeto GITHUB_TOKEN and stop passingGH_PUSH_TOKENto reusable release workflows sogithub.token(github-actions[bot]) handles all git writes.Motivation
CI failure:
prep / prepare_releasejob (run 25891374319, job 76095096624).Scope
.github/workflows/release.yml,.github/workflows/release-v2.ymlChanges per workflow file:
permissionscontents: readcontents: writeprepjobsecrets:GH_PUSH_TOKENbumpjobtoken:${{ secrets.GH_PUSH_TOKEN || github.token }}${{ github.token }}releasejobsecrets:GH_PUSH_TOKENTesting
Manual
Release (v3)workflow viaworkflow_dispatchwith a test version — confirmprep / prepare_releasecreates the release branch without a 403.bumpandreleasejobs complete successfully in sequence.Unit / Integration
composer testpasses locallyAffected code checklist
v3/)v2/legacy codereadme.txt, etc.)Checklist
readme.txtand plugin version bumped if user-facing (release PRs only)