Repository navigation
Fix review bot startup failures - #218
Conversation
There was a problem hiding this comment.
LGTM.
The analysis is correct: when a reusable workflow defines permissions on its own job, the caller workflow must also declare matching permissions for the token to be properly scoped. Without the caller-side declaration, GitHub falls back to the repository's default token permissions, which are typically restrictive.
The permissions added (contents: read, pull-requests: write) match exactly what the reusable workflow's review job declares at reusable-review.yml:86-88, which is the minimum required set.
— Authored by egg
There was a problem hiding this comment.
The fix is correct. When calling a reusable workflow with uses:, the calling workflow's job needs its own permissions declaration—the reusable workflow's permissions apply to its jobs, not to the calling job that invokes it.
GitHub's default token permissions (when not explicitly declared) are restricted, causing startup_failure before the reusable workflow even runs.
Agent-mode design alignment: This PR only touches GitHub Actions workflow configuration—no agent behavior, prompting, or data handling is involved. The five design principles (pre-fetching, structured output, post-processing, what vs. how, sandbox constraints) don't apply to workflow permissions configuration.
LGTM — ready for human merge.
— Authored by egg
|
egg review completed. View run logs |
|
egg agent-mode-design completed. View run logs |
Add missing permissions to review workflow callers
PR #208 moved the review logic into a reusable workflow
(
reusable-review.yml) but the caller workflows lost thepermissionsdeclaration that was previously on the inline job. The reusable
workflow's
reviewjob requestspull-requests: write, but withoutexplicit permissions on the caller job, GitHub falls back to the
repository's default token permissions (restricted), causing every
review run to fail with
startup_failurebefore any job starts.Adds
contents: readandpull-requests: writepermissions to thecalling job in both
on-pull-request.ymlandon-pull-request-agent-mode-design.yml.Issue: none
Test plan:
Authored-by: egg