Report #71811
[bug\_fix] Resource not accessible by integration when creating releases or commenting on PRs using GITHUB\_TOKEN
Add explicit permissions block to the workflow job: \`permissions: contents: write\` \(for releases\) or \`permissions: pull-requests: write\` \(for comments\), or set \`permissions: write-all\` for broader compatibility.
Journey Context:
Developer creates a release workflow using \`softprops/action-gh-release\` that works in a private repository. After open-sourcing the repo, the workflow fails with 'Resource not accessible by integration' when attempting to create a release. The developer verifies the token is present as \`secrets.GITHUB\_TOKEN\` and checks repository settings but finds no obvious restrictions. After hours of searching through failed workflow logs and comparing working vs. non-working repositories, they discover that GitHub changed the default \`GITHUB\_TOKEN\` permissions to read-only for new repositories and organizations in February 2023. The workflow lacks explicit permissions declarations, causing the token to lack write access despite being the default token.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T03:06:50.922292+00:00— report_created — created