Skip to content

Grant required permissions on reusable workflow callers#21

Merged
cpitzi merged 1 commit into
mainfrom
fix-reusable-workflow-permissions
Apr 25, 2026
Merged

Grant required permissions on reusable workflow callers#21
cpitzi merged 1 commit into
mainfrom
fix-reusable-workflow-permissions

Conversation

@cpitzi
Copy link
Copy Markdown
Collaborator

@cpitzi cpitzi commented Apr 25, 2026

Summary

  • Add permissions: blocks to the claude and claude-review jobs that call the shared reusable workflows. Reusable workflows can only inherit caller permissions, never elevate them — without these blocks, every responder/review run fails with startup_failure and the message "is requesting X but is only allowed Y".

Why

  • The shared workflows in PitziLabs/shared-workflows declare the permissions they need (contents: write, pull-requests: write, etc.). When the caller doesn't grant at least those, GitHub rejects the workflow at parse time.
  • Verified via the smoke-test issue on PitziLabs/homeassistant-config — the run failed with the exact mismatch this PR fixes.

Test plan

  • On merge, open a trivial issue with @claude mention and a model:haiku label; confirm the responder workflow runs (no startup_failure) and routes to Haiku.
  • On a follow-up PR, confirm the review workflow runs cleanly.

🤖 Generated with Claude Code

The shared `claude-responder` and `claude-review` reusable workflows
declare job-level permissions (contents: write, etc.) but reusable
workflows can only inherit caller permissions, never elevate. Without
explicit `permissions:` on the calling jobs, GitHub Actions rejects
the workflow with "is requesting X but is only allowed Y" startup
errors and refuses to start any job.

Add the required permissions blocks to the responder and review caller
jobs to match what the reusable workflows declare.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cpitzi cpitzi merged commit ca1f1a9 into main Apr 25, 2026
0 of 2 checks passed
@cpitzi cpitzi deleted the fix-reusable-workflow-permissions branch April 25, 2026 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant