PR Analysis
Deep dive into pull request metrics and insights
Overview
Beyond code review comments, QODRYX provides comprehensive PR analysis including complexity metrics, risk assessment, estimated review time, and intelligent reviewer suggestions. This helps teams prioritize reviews and make better decisions about code changes.
PR Summary
Every PR gets an AI-generated summary that includes:
Implements user authentication with OAuth2 support for Google and GitHub providers. Adds session management, token refresh logic, and protected route middleware.
- • New auth middleware for protected routes
- • OAuth2 providers integration (Google, GitHub)
- • Session storage with Redis
- • Token refresh mechanism
Includes 15 new unit tests and 3 integration tests. Manual testing recommended for OAuth flows.
Complexity Metrics
QODRYX calculates various metrics to help understand PR complexity:
347
Lines Changed
+298 / -49
12
Files Modified
8 src, 4 tests
Medium
Complexity Score
Score: 6.2/10
~25 min
Est. Review Time
Based on changes
Complexity Factors
The complexity score is calculated based on:
- Cognitive Complexity: How difficult the code is to understand
- Cyclomatic Complexity: Number of independent paths through the code
- Dependencies: Number of external modules/files affected
- Change Scope: How many different areas of the codebase are touched
- Test Coverage: Whether changes include adequate test coverage
Risk Assessment
QODRYX evaluates potential risks associated with the PR:
Risk Assessment
Risk Categories
- Breaking Changes: API or behavior changes that affect existing users
- Security Impact: Changes that could introduce vulnerabilities
- Performance Impact: Changes that could affect system performance
- Data Impact: Database migrations, schema changes, data modifications
- Dependency Risk: New or updated external dependencies
Reviewer Suggestions
QODRYX suggests the best reviewers based on:
Code Ownership
Who has the most expertise with these files
Availability
Recent activity and current review load
Team Rules
Required reviewers for specific paths
Review Quality
Historical thoroughness of reviews
Suggested Reviewers Example
Recommended Reviewers
Sarah Chen
Primary owner of auth module (85% of recent commits)
Mike Johnson
Security reviewer, OAuth expertise
Alex Kim
Backend team lead, middleware experience
Change Impact Analysis
Understand how changes propagate through your codebase:
# Impact Analysis Report
## Direct Changes (12 files)
├── src/auth/
│ ├── middleware.ts [NEW] +145 lines
│ ├── oauth.ts [NEW] +89 lines
│ └── session.ts [MODIFIED] +34/-12 lines
├── src/api/
│ └── routes.ts [MODIFIED] +28/-5 lines
└── ...
## Indirect Impact (8 files)
├── src/pages/dashboard.tsx
│ └── Uses: auth/middleware.ts (protected route)
├── src/components/Header.tsx
│ └── Uses: auth/session.ts (user state)
└── ...
## Test Coverage
├── New tests: 15 unit, 3 integration
├── Affected tests: 4 (all passing)
└── Coverage delta: +2.3%PR Insights Dashboard
The QODRYX dashboard provides historical PR analytics:
- Average Review Time: How long PRs take to get approved
- First Response Time: Time until first review comment
- Iteration Count: Average number of review cycles
- Approval Rate: Percentage of PRs approved vs rejected
- Issue Detection Rate: Issues found in review vs production
Configuration
Customize PR analysis in your qodryx.yml:
# qodryx.yml
pr_analysis:
# Generate AI summary for every PR
auto_summary: true
# Calculate complexity metrics
complexity_analysis: true
# Suggest reviewers automatically
suggest_reviewers: true
# Required reviewers by path
codeowners:
"src/auth/**": ["@security-team"]
"src/api/**": ["@backend-team"]
"*.sql": ["@dba-team"]
# Review time estimates
review_time_estimate: true
# Risk assessment
risk_analysis:
enabled: true
block_on_high_risk: false
notify_on_high_risk: ["@team-leads"]