Follow the steps below to add a comment to the Pull Request.
Generates comprehensive PR reviews with summary, change tables, and Mermaid sequence diagrams.
/plugin marketplace add hnegishi/cc-prtools/plugin install cc-prtools@hnegishiFollow the steps below to add a comment to the Pull Request.
This command assumes the use of the gh command. If it's not available, use the GitHub MCP Server as an alternative.
If information corresponding to {PR number} is not provided, retrieve the {PR number} of the current branch.
If information corresponding to {PR number} is provided, proceed directly to STEP2.
Execute git remote -v to retrieve the owner and repo information of the pull request repository.
Based on the {PR number}, retrieve the Pull Request content.
※ If using GitHub MCP Server, execute get_pull_request_files.
Based on the content from STEP3, add an Issue Comment to {PR number} following the format below:
## Summary
Analyze the PR changes and create a Summary section that concisely explains the purpose and background. Please pay attention to the following points:
1. Explain not only technical changes but also "why" the changes were made
2. Use technical terminology appropriately while keeping it understandable for non-technical readers
3. Clearly state the scope and impact of the changes
4. Focus on high-level overview rather than implementation details
5. Keep it around 300 characters
6. Mention business value and problems being solved
7. Appropriately explain changes related to code quality improvements such as technical debt reduction
Example output:
"This PR adds OAuth2.0 support to the user authentication system. This allows users to log in using external services such as Google and Facebook. The change aims to simplify user onboarding and reduce friction in account creation. The implementation uses the OmniAuth gem and adds necessary controllers, models, and views. It also includes functionality for existing users to link external service accounts to their profiles."
## Changes
Analyze the PR changes and create a Changes section that organizes changed files and their contents in table format. Please pay attention to the following points:
1. Classify changed files into logical groups (e.g., models, controllers, views, tests, etc.)
2. Concisely explain the changes to each file (additions, deletions, modifications, etc.)
3. Explain important changes in detail, and trivial changes concisely
4. Provide insights about code structure and design changes
5. Use table format with the following columns:
- File name (relative path)
- Change type (Add/Modify/Delete)
- Description of changes (concise and specific)
6. Sort by importance of changes, listing the most important changes first
Example output:
| File | Change Type | Description |
|------|-------------|-------------|
| app/controllers/oauth_controller.rb | Add | New controller to handle OAuth authentication flow |
| app/models/user.rb | Modify | Added attributes to store OAuth credentials |
| config/routes.rb | Modify | Added OAuth-related routing |
| spec/controllers/oauth_controller_spec.rb | Add | Added test cases for OAuth authentication flow |
## Sequence Diagram(s)
Analyze the PR changes and create sequence diagrams in Mermaid notation showing major flows and interactions. Please pay attention to the following points:
1. Focus on interactions between major components related to the PR changes
2. Visually represent complex logic and flows
3. Match component names with actual codebase names
4. Label each message appropriately to clarify data flow
5. Include conditional branches and loops as necessary
6. If multiple sequence diagrams are needed, provide clear titles and descriptions for each
7. For large-scale changes, focus only on the most important parts
8. Use correct Mermaid notation syntax
Example output:
```mermaid
sequenceDiagram
participant U as User
participant OC as OAuthController
participant OS as OAuthService
participant P as Provider (Google/Facebook)
participant DB as Database
U->>OC: Request authentication
OC->>OS: Generate auth URL
OS->>P: Authentication request
P-->>U: Display auth screen
U->>P: Enter credentials
P-->>OC: Callback with access token
OC->>OS: Retrieve info with token
OS->>P: User info request
P-->>OS: Return user info
OS->>DB: Save user info
DB-->>OC: Save complete
OC-->>U: Redirect (login complete)