fix(ci): grant required permissions to review wrappers#29
Conversation
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
Review Summary by QodoGrant required permissions to review workflow wrappers
WalkthroughsDescription• Grant explicit permissions to review workflow wrappers • Fix workflow_dispatch startup failures after centralizing workflows • Add required permissions: contents read, pull-requests write, issues write, id-token write Diagramflowchart LR
A["Review Workflows<br/>claude-review-manual<br/>opencode-review-manual"] -->|"Add Permissions"| B["permissions:<br/>contents: read<br/>pull-requests: write<br/>issues: write<br/>id-token: write"]
B -->|"Enable"| C["Reusable Workflow<br/>Execution"]
File Changes1. .github/workflows/claude-review-manual.yml
|
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR updates the manual GitHub Actions review workflows to explicitly declare the permissions required by the reusable review workflows, resolving workflow_dispatch startup failures after centralizing workflow wrappers. Flow diagram for manual dispatch of review workflows with permissionsflowchart TD
A[User triggers workflow_dispatch for review] --> B{Which manual workflow}
B -->|claude-review-manual| C[Start claude-review-manual]
B -->|opencode-review-manual| D[Start opencode-review-manual]
C --> E[Apply workflow permissions contents: read]
D --> F[Apply workflow permissions contents: read]
E --> G[Start claude-review job]
F --> H[Start opencode-review job]
subgraph Claude_Job[claude-review job permissions]
G --> G1[contents: read]
G --> G2[pull-requests: write]
G --> G3[issues: write]
G --> G4[id-token: write]
end
subgraph OpenCode_Job[opencode-review job permissions]
H --> H1[contents: read]
H --> H2[pull-requests: write]
H --> H3[issues: write]
H --> H4[id-token: write]
end
G1 --> I[Call reusable-claude-review workflow]
G2 --> I
G3 --> I
G4 --> I
H1 --> J[Call reusable-opencode-review workflow]
H2 --> J
H3 --> J
H4 --> J
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Code Review by Qodo
1. Workflow-scope token elevation
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- You’re specifying
permissionsboth at the workflow level and the job level; consider whether the top-levelcontents: readis necessary given the more specific job permissions, or if you can consolidate to a single definition for clarity. - Double-check that
id-token: writeis actually required by the reusable workflows, and if not, drop it to keep the token scope as minimal as possible.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- You’re specifying `permissions` both at the workflow level and the job level; consider whether the top-level `contents: read` is necessary given the more specific job permissions, or if you can consolidate to a single definition for clarity.
- Double-check that `id-token: write` is actually required by the reusable workflows, and if not, drop it to keep the token scope as minimal as possible.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary
Validation
Summary by Sourcery
CI: