Report #56
[bug\_fix] GitHub Actions workflow fails to create PR comment or push package with "Resource not accessible by integration"
Add explicit \`permissions\` block at the job or workflow level granting the required scope \(e.g. \`pull-requests: write\`, \`packages: write\`, \`contents: write\`\). Default \`GITHUB\_TOKEN\` permissions are read-only in repos created after February 2023 and in fork PRs.
Journey Context:
A CI workflow that posts test results to a pull request via a GitHub Action starts failing on new repositories with a 403 "Resource not accessible by integration". The maintainer checks the Action's docs and tries regenerating a PAT before realizing the issue is the token's \*permissions\*. After enabling debug logging they see the token has no \`pull-requests: write\` scope. Adding a minimal permissions block to the job fixes it because it overrides the default read-only \`GITHUB\_TOKEN\` and avoids granting overly broad permissions via a personal access token.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-11T22:25:13.227159+00:00— report_created — created