feat: split Claude workflow into interactive + issue automation jobs - #39
Conversation
Aligns with the org standard in petry-projects/.github. The claude-issue job runs in automation mode with tools to create PRs, self-review, check CI, and tag code owners when ready. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe PR refactors the Claude Code GitHub Actions workflow by removing issue-triggered logic from the existing Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
Splits the existing Claude Code GitHub Actions workflow into two separate jobs to support both interactive PR review usage and issue-label-triggered automation, aligning permissions with the referenced org standard.
Changes:
- Split the single
claudejob intoclaude(interactive PR reviews /@claudementions) andclaude-issue(issuelabeledautomation). - Added
actions: readandchecks: readpermissions to both jobs and passed them viaadditional_permissions. - Configured
claude-issueto run in automation mode with a constrained tool allowlist and a multi-step implementation/review/CI prompt.
Comments suppressed due to low confidence (1)
.github/workflows/claude.yml:43
- The pinned
actions/checkoutcommit hash here is the same one referenced elsewhere in this repo as# v4(e.g.,.github/workflows/codeql.yml). The# v6.0.2annotation is likely incorrect/misleading; please align the inline version comment with the actual release for this pin.
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| claude_args: | | ||
| --allowedTools "Bash(gh pr create:*),Bash(gh pr view:*),Bash(gh run view:*),Bash(gh run watch:*),Bash(cat:*),Edit,Write" | ||
| prompt: | | ||
| Implement a fix for issue #${{ github.event.issue.number }}. | ||
|
|
||
| After implementing: | ||
| 1. Create a pull request with a clear title and description. Include "Closes #${{ github.event.issue.number }}" in the PR body. | ||
| 2. Self-review your own PR — look for bugs, style issues, missed edge cases, and test gaps. If you find problems, push fixes. | ||
| 3. Review all comments and review threads on the PR. For each one: | ||
| - If you can address the feedback, make the fix, push, and mark the conversation as resolved. | ||
| - If the comment requires human judgment, leave a reply explaining what you need. | ||
| 4. Check CI status. If CI fails, read the logs, fix the issues, and push again. Repeat until CI passes. | ||
| 5. When CI is green, all actionable review comments are resolved, and the PR is ready, read the CODEOWNERS file and leave a comment tagging the relevant code owners to review and merge. |
There was a problem hiding this comment.
The allowed tool set for claude-issue doesn't appear to permit several actions required by the prompt (leaving PR comments/replies, resolving review threads, and tagging code owners). With only gh pr create/view and gh run view/watch, the job likely can't complete steps 3 and 5 of the prompt. Expand the allowed tools to include the minimal gh commands/APIs needed for commenting and thread resolution (and any other operations you expect the automation to perform).
There was a problem hiding this comment.
Addressed: added gh pr comment and gh issue comment to --allowedTools, and removed Bash(cat:*). Note that git commit/push and comment management are already in the action's base tool set — --allowedTools only adds additional tools on top of those defaults.
| checks: read | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
There was a problem hiding this comment.
Same as above: this actions/checkout pin uses the same commit hash that other workflows annotate as # v4, so the # v6.0.2 comment is likely inaccurate. Align the inline version comment to avoid confusion when updating pins later.
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4 |
There was a problem hiding this comment.
The SHA de0fac2e4500dabe0009e67214ff5f5447ce83dd maps to actions/checkout v6.0.2, not v4. The comment is correct.
- Add concurrency group keyed on issue number to prevent duplicate runs - Add gh pr comment and gh issue comment to allowedTools for review replies, thread resolution, and code owner tagging - Remove Bash(cat:*) since the Read tool already covers file reads Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
…39) * feat: split Claude workflow into interactive + issue automation jobs Aligns with the org standard in petry-projects/.github. The claude-issue job runs in automation mode with tools to create PRs, self-review, check CI, and tag code owners when ready. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: add concurrency guard and comment tools to claude-issue job - Add concurrency group keyed on issue number to prevent duplicate runs - Add gh pr comment and gh issue comment to allowedTools for review replies, thread resolution, and code owner tagging - Remove Bash(cat:*) since the Read tool already covers file reads Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: DJ <dj@Rachels-MacBook-Air.local> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>



Summary
claudejob into two:claude(interactive PR reviews and @claude mentions) andclaude-issue(issue-triggered automation).claude-issuejob runs in automation mode with scoped tools to create PRs, self-review, check CI, and tag code owners when ready.actions: readandchecks: readpermissions to both jobs, aligning with the org standard in petry-projects/.github.Test plan
claudeand verify theclaude-issuejob triggers, creates a PR, self-reviews, and tags code owners.claudejob runs for automatic code review.@claudeon a PR and verify the interactive job responds.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Chores