|
9 | 9 | max_queue_size: 100 |
10 | 10 | retry_after_seconds: 60 |
11 | 11 |
|
12 | | -# Diff splitting configuration |
| 12 | +# Diff splitting configuration |
13 | 13 | diff_splitting: |
14 | | - max_chunk_size: 500000 # 500k characters per chunk |
15 | | - max_concurrent: 3 |
| 14 | + max_chunk_size: 500000 # 500k characters per chunk |
| 15 | + max_concurrent: 3 |
16 | 16 |
|
17 | 17 | server: |
18 | 18 | port: "${PORT:-5053}" |
|
28 | 28 | github: |
29 | 29 | command: "sh" |
30 | 30 | args: |
31 | | - - "-c" |
32 | | - - "cd ${GITHUB_APP_CWD} && pnpm run mcp" |
| 31 | + - "-c" |
| 32 | + - "cd ${GITHUB_APP_CWD} && pnpm run mcp" |
33 | 33 | env: |
34 | 34 | GITHUB_APP_CWD: "${GITHUB_APP_CWD}" |
35 | 35 | GITHUB_APP_ID: "${GITHUB_APP_ID}" |
|
38 | 38 | prompt_template: | |
39 | 39 | Review this code diff as a senior developer. Look for bugs, clear logic errors, and code quality problems. |
40 | 40 | Flag significant security concerns (leaked credentials, SQL injection, etc.), but do not mark minor concerns as issues. |
41 | | - Likewise, flag significant performance concerns (memory leaks, deadlocks, long-lived requests), but do not mark minor concerns as issues. Do not use the oracle to review code. |
| 41 | + Likewise, flag significant performance concerns (memory leaks, deadlocks, long-lived requests), but do not mark minor concerns as issues. |
| 42 | + Do not use the oracle to review code. |
42 | 43 |
|
43 | 44 | Focus on: |
44 | 45 | - Logic errors |
|
53 | 54 | Diff to review: |
54 | 55 | __DIFF_CONTENT__ |
55 | 56 |
|
56 | | - When reviewing code: |
57 | | - 1. Look at the pull request details to fetch the context before reviewing. |
58 | | - 2. Review the diff content to identify issues. |
59 | | - 3. Leave specific inline comments or code suggestions for each issue found. |
| 57 | + Review the diff content to identify issues. If you find any issues, leave specific inline comments for each issue found. |
60 | 58 |
|
61 | 59 | Always leave actionable, specific comments with suggested fixes. |
62 | 60 |
|
|
74 | 72 | * List out critical issues and blockers that need to be addressed |
75 | 73 | * Any high-level feedback or suggestions |
76 | 74 |
|
77 | | - IMPORTANT: If you find any issues, include all of them in a JSON block at the end with the following format: |
78 | | - ```json |
79 | | - [ |
80 | | - { |
81 | | - "path": "filename.ext", |
82 | | - "line": 42, |
83 | | - "line_type": "new"|"old", |
84 | | - "message": "Description of the issue", |
85 | | - "suggested_fix": "if (user == \"admin\") {"|null |
86 | | - } |
87 | | - ] |
88 | | - ``` |
89 | | -
|
90 | | - line_type must be one of "new" or "old". This is because in a diff view, the same line number can exist on both sides: |
91 | | - Line 15 in the source (old) |
92 | | - Line 15 in the destination (new) |
93 | | - |
94 | | - A suggested_fix is an optional short snippet of code that will directly replace the single full line of code the indicated issue is on in order to fix the issue. |
95 | | - Because the suggested_fix will only overwrite the single line of code with the issue (the issue line), the suggested_fix can be either: |
96 | | - 1. One line of code that will replace the issue line directly to address the issue. Here's an example where we fix a typo in the method invocation: |
97 | | - Issue line: |
98 | | - System.out.printl(foo); |
99 | | - |
100 | | - suggested_fix: |
101 | | - System.out.println(foo); |
102 | | -
|
103 | | - 2. Multiple lines of code where the first line is the issue line and all subsequent lines are net new lines to be inserted after the issue line. |
104 | | - Because the first line in this multi-line suggested_fix will directly replace the existing issue line, the first line can be unchanged if the suggested_fix is a pure insertion after the issue line, |
105 | | - or the first line can differ from the issue line if the goal is to edit the issue line AND insert net new lines directly below it. Here's a pure insertion example where we add an auth check: |
106 | | - Issue line: |
107 | | - def access_data(user): |
108 | | - |
109 | | - suggested_fix: |
110 | | - def access_user_data(user):\n\n if not user: return\n |
111 | | - |
112 | | - Any other cases are too complex to provide a simple suggested_fix for, so provide null as the suggested_fix value. |
113 | | -
|
114 | 75 | tools: |
115 | 76 | - name: leave_general_comment |
116 | 77 | description: Leave general comments on pull requests |
117 | | - instructions: |
| 78 | + instructions: |
118 | 79 | - "Use this tool to leave general comments on the pull request" |
119 | 80 | - "This will post your comment to the overall pull request discussion" |
120 | 81 | - "Use for summary comments, overall feedback, or general observations" |
121 | 82 | - "Required: message, owner, repo, pr_number" |
122 | 83 | - "Example: 'Overall the code looks good, just a few minor suggestions'" |
123 | 84 | - name: leave_inline_comment |
124 | 85 | description: Leave inline comments on specific lines in pull requests |
125 | | - instructions: |
| 86 | + instructions: |
126 | 87 | - "Use this tool to leave comments on specific lines of code" |
127 | 88 | - "This will post your comment directly on the line in the diff view via PR review" |
128 | 89 | - "Required: message, owner, repo, pr_number, path, line" |
129 | 90 | - "Optional: commit_sha (will be fetched from PR if not provided)" |
130 | 91 | - "Example: Comment on line 25 of src/auth.js about missing error handling" |
131 | 92 | - name: get_pr_comments |
132 | 93 | description: Get all comments on a pull request |
133 | | - instructions: |
| 94 | + instructions: |
134 | 95 | - "Use to retrieve existing comments on the pull request" |
135 | 96 | - "Required: owner, repo, pr_number" |
136 | 97 | - "Returns array of comments and total count" |
|
0 commit comments