Use the GH CLI to analyze and summarize a pull request for the current repository. The current branch is checked out in the same branch as the PR.
RUN gh pr view --json title,body,commits,files,labels,assignees,reviews,comments,checksStatus
- Read the PR title and description carefully
- Check linked issues (if any) using
gh issue view - Review the commit history to understand the progression of changes
- Note any labels, assignees, and check status
-
List all changed files using
gh pr diff -
Create a PR_SUMMARY.md file in the project root with sections for:
- Overview: What this PR accomplishes
- How It Works: Technical explanation of the implementation
- Key Changes: File-by-file breakdown with links (use format:
path/to/file.ts:line) - Architecture Impact: How this fits into the overall system
- Dependencies: Any new dependencies or APIs introduced
- Testing: What tests cover these changes
- Potential Concerns: Any risks or areas that need attention
-
For each significant file change:
- Understand the context and purpose
- Explain the logic flow and implementation details
- Note how it connects to other parts of the codebase
- Identify any patterns or conventions used
- Link to specific lines for important code sections
- Trace through the code execution path
- Understand the data flow and transformations
- Check how edge cases are handled
- Verify integration points with existing code
- Document your understanding in the summary file
- Complete the PR_SUMMARY.md with a comprehensive explanation
- Use clear, technical language to explain how the code works
- Include helpful diagrams or examples if complex logic is involved
- Link to specific files and line numbers for easy navigation
- Highlight any interesting design decisions or trade-offs
# PR Summary: [PR Title]
## Overview
Brief description of what this PR achieves and why it's needed.
## How It Works
Technical explanation of the solution approach and implementation strategy.
## Key Changes
### Modified Files
- `src/services/auth.ts:45-67` - Added new authentication middleware
- `src/utils/validation.ts:12-34` - Enhanced input validation logic
- `tests/auth.test.ts:89-120` - New test cases for auth flow
### New Files
- `src/middleware/rateLimit.ts` - Implements rate limiting functionality
## Architecture Impact
How these changes fit into and affect the overall system architecture.
## Dependencies
- Added `express-rate-limit` for rate limiting
- Updated `jsonwebtoken` to v9.0.0
## Testing
- Unit tests in `tests/auth.test.ts`
- Integration tests in `tests/integration/auth.spec.ts`
- All existing tests still pass
## Potential Concerns
- Performance impact of additional middleware
- Migration needed for existing tokensRemember: The goal is to help the user fully understand the PR's implementation and impact, focusing on explaining how the code works rather than critiquing it.