Skip to content

refactor(ci): Improve claude-code-action workflows#996

Merged
yamadashy merged 1 commit intomainfrom
chore/claude-review-improve
Dec 7, 2025
Merged

refactor(ci): Improve claude-code-action workflows#996
yamadashy merged 1 commit intomainfrom
chore/claude-review-improve

Conversation

@yamadashy
Copy link
Owner

Improve claude-code-action workflow configurations based on latest documentation.

Changes

  • PR Review: Migrate prompt to slash command format (.agents/commands/git/pr-review.md)
    • Enables local usage with /git:pr-review command
    • Manages allowed-tools in frontmatter for better maintainability
  • All workflows: Fix CLI argument from --allowed-tools to --allowedTools (correct camelCase format)
  • PR Review: Change pull-requests permission from read to write for posting comments
  • PR Review: Update documentation URL to code.claude.com

Checklist

  • Run npm run test (N/A - CI config changes only)
  • Run npm run lint (N/A - CI config changes only)

- Migrate PR review prompt to slash command format (.agents/commands/git/pr-review.md)
- Fix CLI argument from --allowed-tools to --allowedTools (correct camelCase format)
- Change pull-requests permission from read to write for PR comments
- Update documentation URL to code.claude.com
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 7, 2025

Walkthrough

This PR updates GitHub Actions workflows and code review guidance. It expands the PR review prompt into a structured guide with metadata and workflow steps, updates workflow permissions, simplifies Claude model arguments, and standardizes tool parameter naming conventions across workflows.

Changes

Cohort / File(s) Summary
Code review prompt expansion
\.agents/commands/git/pr-review\.md
Replaces single-sentence prompt with extensive structured guide including metadata (allowed-tools, description), premortem analysis, step-by-step commenting protocol (read existing, identify feedback, submit/update, use inline, collapsible blocks), and references to CLAUDE.md.
Core workflow reconfiguration
\.github/workflows/claude-code-review\.yml
Escalates pull-request permissions from read to write; replaces multi-line prompt block with single-line string; reduces claude_args from extensive allowed-tools configuration to minimalist '--model opus' option.
Tool parameter naming standardization
\.github/workflows/claude-issue-similar\.yml, \.github/workflows/claude-issue-triage\.yml
Updates claude_args from '--allowed-tools' to '--allowedTools' (capitalization change) while preserving underlying tool list content.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Permission escalation in claude-code-review.yml (read→write for pull-requests) warrants verification of security justification
  • Verify consistency of claude_args changes across all workflow files
  • Confirm that '--model opus' replacement maintains intended functionality vs. the previous allowed-tools approach

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main objective of the PR, which is to improve and refactor the claude-code-action workflow configurations across multiple CI workflow files.
Description check ✅ Passed The description is comprehensive and well-structured, covering all key changes with clear subsections, specific file references, and a completed checklist matching the repository template.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/claude-review-improve

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0d939c2 and e671a2b.

📒 Files selected for processing (4)
  • .agents/commands/git/pr-review.md (1 hunks)
  • .github/workflows/claude-code-review.yml (2 hunks)
  • .github/workflows/claude-issue-similar.yml (1 hunks)
  • .github/workflows/claude-issue-triage.yml (1 hunks)
🧰 Additional context used
🪛 LanguageTool
.agents/commands/git/pr-review.md

[uncategorized] ~26-~26: The official name of this software platform is spelled with a capital “H”.
Context: ... highlighting specific code issues, use mcp__github_inline_comment__create_inline_comment ...

(GITHUB)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Build and run (windows-latest, 24.x)
  • GitHub Check: Test (windows-latest, 25.x)
  • GitHub Check: Build and run (windows-latest, 25.x)
  • GitHub Check: Test (ubuntu-latest, 24.x)
  • GitHub Check: Test (macos-latest, 25.x)
  • GitHub Check: Test (windows-latest, 22.x)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (7)
.github/workflows/claude-issue-similar.yml (1)

27-27: Argument naming convention applied consistently.

The camelCase change from --allowed-tools to --allowedTools aligns with the PR objectives to standardize CLI argument naming. The tool list remains intact with no functional changes.

.github/workflows/claude-issue-triage.yml (1)

27-27: Argument naming convention applied consistently.

The camelCase change from --allowed-tools to --allowedTools aligns with the PR objectives to standardize CLI argument naming. The tool list remains intact with no functional changes.

.github/workflows/claude-code-review.yml (2)

25-25: Permission escalation correctly enables comment posting.

The pull-requests: write permission change is necessary for the Claude action to post PR comments and inline feedback. This aligns with the new /git:pr-review slash command approach that requires comment-posting capabilities.


40-43: Slash command format and documentation URL updated correctly.

The migration to /git:pr-review slash command format and simplified claude_args cleanly delegates prompt and tool management to the externalized .agents/commands/git/pr-review.md guide. The documentation URL update to code.claude.com/docs/en/cli-reference is correct per PR objectives.

Verify that the slash command handler correctly reads the allowed-tools from the frontmatter metadata in pr-review.md and that no tool capabilities are lost by removing the explicit --allowedTools parameter from this workflow.

.agents/commands/git/pr-review.md (3)

1-8: Verify frontmatter tool specification naming convention.

The frontmatter uses allowed-tools (hyphenated), while the PR objectives mention standardizing to allowedTools (camelCase). This may be intentional if the frontmatter follows a different naming convention than CLI arguments, but it warrants clarification.

Confirm whether the frontmatter allowed-tools key should use camelCase (allowedTools) to match the CLI argument standardization across other workflows, or if hyphenated keys are the correct convention for this metadata format.


10-20: Review scope and premortem analysis well-defined.

The instructions clearly delineate review focus areas and add premortem analysis for identifying failure scenarios. The reference to CLAUDE.md for style conventions is a good practice for consistency.


21-29: Commenting protocol provides clear, actionable guidance.

The step-by-step instructions for reading existing comments, avoiding duplication, using inline comments, and structuring feedback with collapsible details improve the quality and clarity of reviews. The protocol prevents repeated feedback and encourages incremental value.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @yamadashy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the claude-code-action workflow configurations to align with the latest documentation. The changes focus on enhancing the PR review process by migrating the prompt to a more flexible slash command format, standardizing CLI arguments, and adjusting GitHub permissions to facilitate automated commenting.

Highlights

  • PR Review Prompt Migration: The pr-review prompt has been updated to a slash command format, enabling local usage with /git:pr-review.
  • Allowed Tools Management: The allowed-tools configuration for the pr-review prompt is now managed within the frontmatter, improving maintainability.
  • CLI Argument Correction: The CLI argument --allowed-tools has been corrected to the proper camelCase format, --allowedTools, across all relevant workflows.
  • GitHub Permissions Update: The pull-requests permission for the PR Review workflow has been changed from read to write to allow posting comments.
  • Documentation URL Update: The documentation URL has been updated to code.claude.com.
Ignored Files
  • Ignored by pattern: .github/workflows/** (3)
    • .github/workflows/claude-code-review.yml
    • .github/workflows/claude-issue-similar.yml
    • .github/workflows/claude-issue-triage.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@codecov
Copy link

codecov bot commented Dec 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.38%. Comparing base (0d939c2) to head (e671a2b).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #996   +/-   ##
=======================================
  Coverage   90.38%   90.38%           
=======================================
  Files         110      110           
  Lines        7890     7890           
  Branches     1528     1528           
=======================================
  Hits         7131     7131           
  Misses        759      759           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request significantly improves the claude-code-action workflow configuration. Migrating the PR review prompt to a structured slash command format with detailed instructions and frontmatter is an excellent change that enhances maintainability and should improve the quality of AI-generated reviews. The other changes mentioned in the description, such as fixing the CLI argument casing and updating permissions, are also valuable improvements. I have one suggestion on the new prompt file to further improve the readability of the configuration.

@@ -1,5 +1,29 @@
Please review the provided PR.
---
allowed-tools: mcp__github_inline_comment__create_inline_comment,Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better readability and maintainability of the allowed-tools list in the frontmatter, consider using the YAML list format instead of a single comma-separated string. This makes it easier to add, remove, or view individual tools.

Suggested change
allowed-tools: mcp__github_inline_comment__create_inline_comment,Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)
allowed-tools:
- mcp__github_inline_comment__create_inline_comment
- Bash(gh issue view:*)
- Bash(gh search:*)
- Bash(gh issue list:*)
- Bash(gh pr comment:*)
- Bash(gh pr diff:*)
- Bash(gh pr view:*)
- Bash(gh pr list:*)

@yamadashy yamadashy merged commit 1bc0038 into main Dec 7, 2025
56 of 57 checks passed
@yamadashy yamadashy deleted the chore/claude-review-improve branch December 7, 2025 07:36
@yamadashy yamadashy restored the chore/claude-review-improve branch December 7, 2025 07:37
@yamadashy yamadashy deleted the chore/claude-review-improve branch December 7, 2025 07:38
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