You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/capabilities/pr-review.mdx
+25-97Lines changed: 25 additions & 97 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,122 +4,50 @@ sidebarTitle: "PR Review"
4
4
icon: "eye"
5
5
---
6
6
7
-
Codegen agents automatically review your pull requests, providing intelligent feedback, suggestions, and code analysis to improve code quality and catch issues before they reach production.
8
-
9
-
This intelligent system analyzes code changes, identifies potential problems, and provides actionable feedback to help maintain high code quality standards.
7
+
Codegen provides a configurable AI code review feature similar to CodeRabbit, Graphite, or Greptile as a first-class feature.
10
8
11
9
<Card
12
10
title="Configure PR Reviews"
13
11
icon="eye"
14
12
href="https://codegen.com/settings/review"
15
13
>
16
-
Configure PR review settings at the organization level or customize per
17
-
repository. Set review criteria, feedback preferences, and integration
18
-
options.
14
+
Set up PR review at the organization level, then customize per repository.
19
15
</Card>
20
16
21
-
<Tip>
22
-
The PR Review Agent provides comprehensive code analysis including security
23
-
vulnerabilities, performance issues, code style violations, and logical
24
-
errors.
25
-
</Tip>
26
-
27
-
## How PR Review Works
28
-
29
-
Codegen automatically reviews your pull requests with intelligent analysis:
30
-
31
-
-**Automatic Triggering:** Monitors new pull requests and code changes in real-time
32
-
-**Comprehensive Analysis:** Reviews code for bugs, security issues, performance problems, and style violations
33
-
-**Contextual Feedback:** Provides specific, actionable suggestions with line-by-line comments
34
-
-**Integration Aware:** Understands your codebase patterns, dependencies, and architectural decisions
35
-
36
-
## What Triggers PR Review
37
-
38
-
PR review activates when:
39
-
40
-
-**New Pull Requests:** Any new PR opened in monitored repositories
41
-
-**Code Updates:** New commits pushed to existing pull request branches
42
-
-**Review Requests:** Manual review requests through GitHub or other integrations
43
-
-**Scheduled Reviews:** Periodic reviews of long-running or draft pull requests
44
-
45
-
## The Review Process
46
-
47
-
When Codegen reviews a pull request, it follows this comprehensive process:
48
-
49
-
1.**Code Analysis:** Deep analysis of all changed files and their context
50
-
2.**Pattern Recognition:** Identifies common issues, anti-patterns, and potential bugs
51
-
3.**Security Scanning:** Checks for security vulnerabilities and sensitive data exposure
52
-
4.**Performance Review:** Analyzes code for performance bottlenecks and optimization opportunities
53
-
5.**Style Compliance:** Ensures code follows established style guides and best practices
54
-
6.**Contextual Feedback:** Generates specific, actionable comments and suggestions
17
+
## How It Works
55
18
56
-
## Review Categories
19
+
When you open a PR or push new commits, Codegen agents analyze the changes and provide:
57
20
58
-
The PR Review Agent analyzes multiple aspects of your code:
21
+
-**Inline comments** on specific lines with actionable feedback
22
+
-**Security scanning** for vulnerabilities and unsafe patterns
23
+
-**Code quality** suggestions for maintainability and best practices
24
+
-**Architectural feedback** on design patterns and structure
59
25
60
-
### Code Quality
26
+
##Configuration
61
27
62
-
-**Logic Errors:** Identifies potential bugs and logical inconsistencies
63
-
-**Code Complexity:** Highlights overly complex functions that need refactoring
64
-
-**Maintainability:** Suggests improvements for code readability and maintainability
65
-
-**Best Practices:** Ensures adherence to language and framework best practices
28
+
Configure PR reviews at two levels:
66
29
67
-
### Security Analysis
30
+
### Organization Settings
68
31
69
-
-**Vulnerability Detection:** Scans for common security vulnerabilities (SQL injection, XSS, etc.)
70
-
-**Sensitive Data:** Identifies potential exposure of secrets, API keys, or personal data
71
-
-**Access Control:** Reviews authentication and authorization implementations
72
-
-**Dependency Security:** Checks for known vulnerabilities in dependencies
32
+
Set global defaults and organization-wide review rules at [Organization Settings → PR Review](https://codegen.com/settings/review).
73
33
74
-
### Performance Optimization
34
+
### Repository Settings
75
35
76
-
-**Algorithmic Efficiency:** Identifies inefficient algorithms and data structures
77
-
-**Resource Usage:** Reviews memory usage, database queries, and API calls
78
-
-**Caching Opportunities:** Suggests areas where caching could improve performance
79
-
-**Scalability Concerns:** Highlights potential bottlenecks for high-traffic scenarios
36
+
Override settings and add repository-specific rules at **Repository Settings → Review**.
80
37
81
-
## Configuration Options
38
+
Repository rules are combined with organization rules for comprehensive coverage. You can:
82
39
83
-
The PR Review Agent can be configured at multiple levels:
40
+
- Enable/disable PR reviews for the repository
41
+
- Add custom review guidelines specific to the codebase
42
+
- Define language-specific requirements
43
+
- Set repository-specific coding standards
84
44
85
-
### Organization Level
86
-
87
-
-**Global settings** - Configure default review behavior for all repositories
88
-
-**Review criteria** - Set standards for code quality, security, and performance
0 commit comments