repo_name
stringlengths
1
62
dataset
stringclasses
1 value
lang
stringclasses
11 values
pr_id
int64
1
20.1k
owner
stringlengths
2
34
reviewer
stringlengths
2
39
diff_hunk
stringlengths
15
262k
code_review_comment
stringlengths
1
99.6k
ai-pr-reviewer
github_2023
typescript
240
coderabbitai
github-actions[bot]
@@ -89,34 +88,26 @@ ${tag}` } getRawSummary(summary: string) { - const content = this.getContentWithinTags( + return this.getContentWithinTags( summary, - RAW_SUMMARY_TAG, - RAW_SUMMARY_TAG_END + RAW_SUMMARY_START_TAG, + RAW_SUMMARY_END_TAG ) - // remove the first and la...
:robot: OpenAI The `getRawSummary` function has been modified to remove the first and last line of content obtained within tags. Please review this change for correctness. ```suggestion getRawSummary(summary: string) { return this.getContentWithinTags( summary, RAW_SUMMARY_START_TAG, RAW_SUMMAR...
ai-pr-reviewer
github_2023
typescript
240
coderabbitai
github-actions[bot]
@@ -140,10 +131,10 @@ ${tag}` const messageClean = this.removeContentWithinTags( message, - DESCRIPTION_TAG, - DESCRIPTION_TAG_END + DESCRIPTION_START_TAG, + DESCRIPTION_END_TAG ) - const newDescription = `${description}\n${DESCRIPTION_TAG}\n${messageClean}\n${D...
:robot: OpenAI In `Commenter`, `DESCRIPTION_TAG` and `DESCRIPTION_TAG_END` have been replaced with `DESCRIPTION_START_TAG` and `DESCRIPTION_END_TAG`. Please review this change for correctness. ```suggestion async addCommentToPullRequest( repo: { owner: string; repo: string }, pull_number: number, message...
ai-pr-reviewer
github_2023
typescript
240
coderabbitai
github-actions[bot]
@@ -562,12 +553,12 @@ ${chain} // commit ids are comments between the commit_ids_reviewed_start and commit_ids_reviewed_end markers // <!-- [commit_id] --> getReviewedCommitIds(commentBody: string): string[] { - const start = commentBody.indexOf(COMMIT_ID_TAG) - const end = commentBody.indexOf(COMMIT_ID_...
:robot: OpenAI In `Commenter`, `COMMIT_ID_TAG` and `COMMIT_ID_TAG_END` have been replaced with `COMMIT_ID_START_TAG` and `COMMIT_ID_END_TAG`. Please review this change for correctness. ```suggestion // commit ids are comments between the commit_ids_reviewed_start and commit_ids_reviewed_end markers // <!-- [commit...
ai-pr-reviewer
github_2023
typescript
232
coderabbitai
github-actions[bot]
@@ -16,6 +16,7 @@ async function run(): Promise<void> { getBooleanInput('debug'), getBooleanInput('summary_only'), getInput('max_files'), + getBooleanInput('review_simple_changes'),
:robot: OpenAI The new boolean option `review_simple_changes` is not being initialized correctly. It should be initialized as `getBooleanInput('review_simple_changes')`. <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
others
232
coderabbitai
github-actions[bot]
@@ -58,6 +58,7 @@ jobs: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} with: debug: false + review_simple_changes: false
:robot: OpenAI The `review_simple_changes` parameter is not defined in the old hunk and it's unclear what it does. Please provide more information on what this parameter does and how it affects the workflow. <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
232
coderabbitai
github-actions[bot]
@@ -23,8 +23,8 @@ $file_diff \`\`\` I would like you to summarize the diff within 50 words. - -Below the summary, I would also like you to triage the diff as \`NEEDS_REVIEW\` or +` + triageFileDiff = `Below the summary, I would also like you to triage the diff as \`NEEDS_REVIEW\` or \`APPROVED\` based on the fo...
:robot: OpenAI The new hunk introduces a new feature to triage the diff as `NEEDS_REVIEW` or `APPROVED` based on certain criteria. However, the implementation is incomplete and contains a syntax error. Please fix the syntax error and complete the implementation of this feature. Additionally, it would be helpful to pro...
ai-pr-reviewer
github_2023
typescript
232
coderabbitai
github-actions[bot]
@@ -248,8 +248,15 @@ $patches this.summarizeReleaseNotes = summarizeReleaseNotes } - renderSummarizeFileDiff(inputs: Inputs): string { - return inputs.render(this.summarizeFileDiff) + renderSummarizeFileDiff( + inputs: Inputs, + reviewSimpleChanges: boolean + ): string { + let prompt = this.sum...
:robot: OpenAI The new hunk introduces a new boolean parameter `reviewSimpleChanges` to the `renderSummarizeFileDiff` function. The implementation of this feature is incomplete and contains a syntax error. Please fix the syntax error and complete the implementation of this feature. Additionally, it would be helpful to...
ai-pr-reviewer
github_2023
typescript
232
coderabbitai
github-actions[bot]
@@ -248,8 +248,15 @@ $patches this.summarizeReleaseNotes = summarizeReleaseNotes } - renderSummarizeFileDiff(inputs: Inputs): string { - return inputs.render(this.summarizeFileDiff) + renderSummarizeFileDiff( + inputs: Inputs, + reviewSimpleChanges: boolean + ): string { + let prompt = this.sum...
:robot: OpenAI > Note: This review was outside of the patch, so it was mapped to the patch with the greatest overlap. Original lines [262-266] The new hunk introduces a new function `renderSummarizeChangesets`. However, there is no implementation provided for this function. Please provide an implementation for this f...
ai-pr-reviewer
github_2023
others
231
coderabbitai
github-actions[bot]
@@ -23,7 +23,6 @@ NOTES: [more conservative data usage policy](https://openai.com/policies/api-data-usage-policies) compared to their ChatGPT offering.
:robot: OpenAI The link to the data usage policy seems to be broken. Please verify and update if necessary. ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
229
coderabbitai
github-actions[bot]
@@ -50,7 +50,6 @@ Your task is to de-deduplicate and group together files with related/similar changes into a single changeset. Respond with the updated changesets using the same format as the input. -Changesets: $raw_summary `
:robot: OpenAI The code seems to be incomplete and doesn't provide enough context to review. Please provide the complete new hunk for review. <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
others
227
coderabbitai
github-actions[bot]
@@ -22,17 +22,22 @@ "devDependencies": { "@jest/globals": "^29.5.0", "@types/node": "^18.15.11", + "@typescript-eslint/eslint-plugin": "^5.59.0", "@typescript-eslint/parser": "^5.59.0", "@vercel/ncc": "^0.36.1", "chatgpt": "^5.2.2", "eslint": "^8.38.0"...
:robot: OpenAI The `package-lock.json` file has been updated with new dev dependencies. No issues found. <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
others
227
coderabbitai
github-actions[bot]
@@ -2197,15 +2202,15 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.56.0.tgz", - "integrity": "sha512-ZNW37Ccl3oMZkzxrYDUX4o7cnuPgU+YrcaYXzsRtLB16I1FR...
:robot: OpenAI The `@typescript-eslint/eslint-plugin` dependency has been updated to version 5.59.0. No issues found. <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
others
227
coderabbitai
github-actions[bot]
@@ -2257,7 +2262,7 @@ } } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { + "node_modules/@typescript-eslint/scope-manager": { "version": "5.59.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-man...
:robot: OpenAI The `@typescript-eslint/scope-manager` dependency has been updated to version 5.59.0. No issues found. <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
others
227
coderabbitai
github-actions[bot]
@@ -38,16 +38,21 @@ "devDependencies": {
:robot: OpenAI The `@typescript-eslint/eslint-plugin` dependency is added in the new hunk but not present in the old hunk. Is this intentional? If so, please ignore this comment. Otherwise, please ensure that this dependency is added to the `devDependencies` object in `package.json`. ```suggestion "@typescript-es...
ai-pr-reviewer
github_2023
others
227
coderabbitai
github-actions[bot]
@@ -38,16 +38,21 @@ "devDependencies": { "@jest/globals": "^29.5.0", "@types/node": "^18.15.11", + "@typescript-eslint/eslint-plugin": "^5.59.0", "@typescript-eslint/parser": "^5.59.0",
:robot: OpenAI The `@typescript-eslint/parser` dependency is added in the new hunk but not present in the old hunk. Is this intentional? If so, please ignore this comment. Otherwise, please ensure that this dependency is added to the `devDependencies` object in `package.json`. ```suggestion "@typescript-eslint/par...
ai-pr-reviewer
github_2023
others
227
coderabbitai
github-actions[bot]
@@ -38,16 +38,21 @@ "devDependencies": { "@jest/globals": "^29.5.0", "@types/node": "^18.15.11", + "@typescript-eslint/eslint-plugin": "^5.59.0", "@typescript-eslint/parser": "^5.59.0", "@vercel/ncc": "^0.36.1", "chatgpt": "^5.2.2", "eslint": "^8.38.0", + "eslint-config-standard-w...
:robot: OpenAI The `eslint-config-standard-with-typescript` dependency is added in the new hunk but not present in the old hunk. Is this intentional? If so, please ignore this comment. Otherwise, please ensure that this dependency is added to the `devDependencies` object in `package.json`. ```suggestion "eslint-co...
ai-pr-reviewer
github_2023
others
227
coderabbitai
github-actions[bot]
@@ -38,16 +38,21 @@ "devDependencies": { "@jest/globals": "^29.5.0", "@types/node": "^18.15.11", + "@typescript-eslint/eslint-plugin": "^5.59.0", "@typescript-eslint/parser": "^5.59.0", "@vercel/ncc": "^0.36.1", "chatgpt": "^5.2.2", "eslint": "^8.38.0", + "eslint-config-standard-w...
:robot: OpenAI The `eslint-plugin-import` dependency is added in the new hunk but not present in the old hunk. Is this intentional? If so, please ignore this comment. Otherwise, please ensure that this dependency is added to the `devDependencies` object in `package.json`. ```suggestion "eslint-plugin-import": "^2....
ai-pr-reviewer
github_2023
others
227
coderabbitai
github-actions[bot]
@@ -38,16 +38,21 @@ "devDependencies": { "@jest/globals": "^29.5.0", "@types/node": "^18.15.11", + "@typescript-eslint/eslint-plugin": "^5.59.0", "@typescript-eslint/parser": "^5.59.0", "@vercel/ncc": "^0.36.1", "chatgpt": "^5.2.2", "eslint": "^8.38.0", + "eslint-config-standard-w...
:robot: OpenAI The `eslint-plugin-n` and `eslint-plugin-promise` dependencies are added in the new hunk but not present in the old hunk. Is this intentional? If so, please ignore this comment. Otherwise, please ensure that these dependencies are added to the `devDependencies` object in `package.json`. ```suggestion ...
ai-pr-reviewer
github_2023
others
227
coderabbitai
github-actions[bot]
@@ -38,16 +38,21 @@ "devDependencies": { "@jest/globals": "^29.5.0", "@types/node": "^18.15.11", + "@typescript-eslint/eslint-plugin": "^5.59.0", "@typescript-eslint/parser": "^5.59.0", "@vercel/ncc": "^0.36.1", "chatgpt": "^5.2.2", "eslint": "^8.38.0", + "eslint-config-standard-w...
:robot: OpenAI The `typescript` dependency is updated from version `4.4.4` to `4.9.5`. Is this intentional? If so, please ignore this comment. Otherwise, please ensure that the correct version of `typescript` is specified in the `devDependencies` object in `package.json`. ```suggestion "typescript": "^4.9.5", ``` ...
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -1,12 +1,11 @@ -/* eslint-disable @typescript-eslint/explicit-function-return-type */ -import * as core from '@actions/core' -import * as github from '@actions/github' +import {info, warning} from '@actions/core' +import {context as github_context} from '@actions/github' import {octokit} from './octokit.js'
:robot: OpenAI There's an unused import statement for `info` and `warning`. Please remove it. ```suggestion import {context as github_context} from '@actions/github' import {octokit} from './octokit.js' const context = github_context const repo = context.repo export const COMMENT_GREETING = ':robot: OpenAI' export co...
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -1,12 +1,11 @@ -/* eslint-disable @typescript-eslint/explicit-function-return-type */ -import * as core from '@actions/core' -import * as github from '@actions/github' +import {info, warning} from '@actions/core' +import {context as github_context} from '@actions/github' import {octokit} from './octokit.js' -cons...
:robot: OpenAI There's no need to assign `github.context.repo` to a new variable. You can directly use `github.context.repo` instead. ```suggestion const repo = github_context.repo ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -29,19 +28,22 @@ export const RAW_SUMMARY_TAG = export const RAW_SUMMARY_TAG_END = '<!-- end of auto-generated comment: raw summary by openai -->' +export const COMMIT_ID_TAG = '<!-- commit_ids_reviewed_start -->' +export const COMMIT_ID_TAG_END = '<!-- commit_ids_reviewed_end -->'
:robot: OpenAI Please add a description of what these constants are used for. ```suggestion export const RAW_SUMMARY_TAG_END = '<!-- end of auto-generated comment: raw summary by openai -->' /** * These tags are used to identify the start and end of commit ids that have been reviewed. */ export const COMMIT_ID_TA...
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -29,19 +28,22 @@ export const RAW_SUMMARY_TAG = export const RAW_SUMMARY_TAG_END = '<!-- end of auto-generated comment: raw summary by openai -->' +export const COMMIT_ID_TAG = '<!-- commit_ids_reviewed_start -->' +export const COMMIT_ID_TAG_END = '<!-- commit_ids_reviewed_end -->' + export class Commenter { ...
:robot: OpenAI > Note: This review was outside of the patch, so it was mapped to the patch with the greatest overlap. Original lines [38-68] The `comment` function has been refactored. Please review the changes below. <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -29,19 +28,22 @@ export const RAW_SUMMARY_TAG = export const RAW_SUMMARY_TAG_END = '<!-- end of auto-generated comment: raw summary by openai -->' +export const COMMIT_ID_TAG = '<!-- commit_ids_reviewed_start -->' +export const COMMIT_ID_TAG_END = '<!-- commit_ids_reviewed_end -->' + export class Commenter { ...
:robot: OpenAI The `target` variable is not initialized. Please initialize it to `null`. ```suggestion async comment(message: string, tag: string, mode: string) { let target: number | null = null; ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -29,19 +28,22 @@ export const RAW_SUMMARY_TAG = export const RAW_SUMMARY_TAG_END = '<!-- end of auto-generated comment: raw summary by openai -->' +export const COMMIT_ID_TAG = '<!-- commit_ids_reviewed_start -->' +export const COMMIT_ID_TAG_END = '<!-- commit_ids_reviewed_end -->' + export class Commenter { ...
:robot: OpenAI The `if` block can be simplified using optional chaining. ```suggestion if (context.payload.pull_request?.number != null) { target = context.payload.pull_request.number; } else if (context.payload.issue?.number != null) { target = context.payload.issue.number; } else { warning( 'Skipped: cont...
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -61,7 +63,7 @@ ${tag}` } else if (mode === 'replace') { await this.replace(body, tag, target) } else { - core.warning(`Unknown mode: ${mode}, use "replace" instead`) + warning(`Unknown mode: ${mode}, use "replace" instead`) await this.replace(body, tag, target) }
:robot: OpenAI The `if` block can be simplified using a ternary operator. ```suggestion mode === 'replace' ? await this.replace(body, tag, target) : ( warning(`Unknown mode: ${mode}, use "replace" instead`), await this.replace(body, tag, target) ); ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -84,7 +86,7 @@ ${tag}` return content } - get_raw_summary(summary: string) { + getRawSummary(summary: string) { const content = this.getContentWithinTags( summary, RAW_SUMMARY_TAG,
:robot: OpenAI The `getRawSummary` function uses `RAW_SUMMARY_TAG` instead of `RAW_SUMMARY_TAG_START`. Please update the constant name. ```suggestion getRawSummary(summary: string) { const content = this.getContentWithinTags( summary, RAW_SUMMARY_TAG_START, RAW_SUMMARY_TAG_END ) return content } ```...
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -1,25 +1,27 @@ -import * as core from '@actions/core' -import * as github from '@actions/github' +import {error, info, warning} from '@actions/core' +// eslint-disable-next-line camelcase +import {context as github_context} from '@actions/github'
:robot: OpenAI The import statements should be sorted alphabetically. ```suggestion import pLimit from 'p-limit' import {context as github_context} from '@actions/github' import {error, info, warning} from '@actions/core' ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -1,25 +1,27 @@ -import * as core from '@actions/core' -import * as github from '@actions/github' +import {error, info, warning} from '@actions/core' +// eslint-disable-next-line camelcase +import {context as github_context} from '@actions/github' import pLimit from 'p-limit' -import {Bot} from './bot.js' +import {t...
:robot: OpenAI The `Commenter` class and its associated constants are not used in this file. Consider removing them. <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -1,9 +1,9 @@ -import * as core from '@actions/core' +import {getInput, warning} from '@actions/core'
:robot: OpenAI The import statement on line 1 should be updated to only import the `getInput` and `warning` functions from the `@actions/core` module. ```suggestion import {getInput, warning} from '@actions/core' ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -1,9 +1,9 @@ -import * as core from '@actions/core' +import {getInput, warning} from '@actions/core' import {Octokit} from '@octokit/action' import {retry} from '@octokit/plugin-retry' import {throttling} from '@octokit/plugin-throttling' -const token = core.getInput('token') || process.env.GITHUB_TOKEN +const ...
:robot: OpenAI The `token` variable should be declared using `const` instead of `let`. ```suggestion const token = getInput('token') || process.env.GITHUB_TOKEN ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -12,19 +12,19 @@ export const octokit = new RetryAndThrottlingOctokit({ onRateLimit: ( retryAfter: number, options: any, - o: Octokit, + _o: Octokit, retryCount: number ) => { - core.warning( + warning( `Request quota exhausted for request ${options.method}...
:robot: OpenAI The `core.warning` function calls on lines 18 and 27 should be updated to use the imported `warning` function instead. Additionally, the `_o` parameter on line 15 is unused and can be removed. Finally, the `options` parameter type on lines 14 and 26 should be updated to `Octokit.RequestOptions`. ```sugg...
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -35,10 +41,10 @@ async function run(): Promise<void> { try { lightBot = new Bot( options, - new OpenAIOptions(options.openai_light_model, options.light_token_limits) + new OpenAIOptions(options.openaiLightModel, options.lightTokenLimits) ) } catch (e: any) { - core.warning( + w...
:robot: OpenAI The try-catch block at lines 41-49 is missing an error message. Consider adding a more descriptive error message to help users debug issues. ```suggestion try { lightBot = new Bot( options, new OpenAIOptions(options.openaiLightModel, options.lightTokenLimits) ) } catch (e: any) { warning( ...
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -48,10 +54,10 @@ async function run(): Promise<void> { try { heavyBot = new Bot( options, - new OpenAIOptions(options.openai_heavy_model, options.heavy_token_limits) + new OpenAIOptions(options.openaiHeavyModel, options.heavyTokenLimits) ) } catch (e: any) { - core.warning( + w...
:robot: OpenAI The try-catch block at lines 54-62 is missing an error message. Consider adding a more descriptive error message to help users debug issues. ```suggestion try { heavyBot = new Bot( options, new OpenAIOptions(options.openaiHeavyModel, options.heavyTokenLimits) ) } catch (e: any) { warning( ...
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -69,25 +75,23 @@ async function run(): Promise<void> { ) { await handleReviewComment(heavyBot, options, prompts) } else { - core.warning( - 'Skipped: this action only works on push events or pull_request' - ) + warning('Skipped: this action only works on push events or pull_req...
:robot: OpenAI Consider adding more specific error handling for the `setFailed` function call at lines 82-84. It would be helpful to include the exact error message in the failure output. ```suggestion try { if (process.env.GITHUB_EVENT_NAME === 'push' || process.env.GITHUB_EVENT_NAME === 'pull_request') { await...
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -69,25 +75,23 @@ async function run(): Promise<void> { ) { await handleReviewComment(heavyBot, options, prompts) } else { - core.warning( - 'Skipped: this action only works on push events or pull_request' - ) + warning('Skipped: this action only works on push events or pull_req...
:robot: OpenAI Consider adding more specific error handling for the `warning` function calls at lines 90 and 94. It would be helpful to include the exact error message in the warning output. ```suggestion process .on('unhandledRejection', (reason, p) => { warning(`Unhandled Rejection at Promise: ${reason}, promi...
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -1,12 +1,13 @@ -/* eslint-disable @typescript-eslint/explicit-function-return-type */ -import * as core from '@actions/core' -import * as github from '@actions/github' -import {octokit} from './octokit.js' +import {info, warning} from '@actions/core' +// eslint-disable-next-line camelcase +import {context as github_...
:robot: OpenAI The import statements should be sorted alphabetically. ```suggestion import {context as github_context} from '@actions/github' import {info, warning} from '@actions/core' import {octokit} from './octokit' ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -1,12 +1,13 @@ -/* eslint-disable @typescript-eslint/explicit-function-return-type */ -import * as core from '@actions/core' -import * as github from '@actions/github' -import {octokit} from './octokit.js' +import {info, warning} from '@actions/core' +// eslint-disable-next-line camelcase +import {context as github_...
:robot: OpenAI The `COMMENT_TAG` constant is not used in the code. Please remove it. ```suggestion export const COMMENT_GREETING = ':robot: OpenAI' ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -29,19 +30,22 @@ export const RAW_SUMMARY_TAG = export const RAW_SUMMARY_TAG_END = '<!-- end of auto-generated comment: raw summary by openai -->' +export const COMMIT_ID_TAG = '<!-- commit_ids_reviewed_start -->' +export const COMMIT_ID_TAG_END = '<!-- commit_ids_reviewed_end -->' + export class Commenter { ...
:robot: OpenAI The `mode` parameter should have a default value of `"replace"`. ```suggestion async comment(message: string, tag: string, mode: string = "replace") { ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -29,19 +30,22 @@ export const RAW_SUMMARY_TAG = export const RAW_SUMMARY_TAG_END = '<!-- end of auto-generated comment: raw summary by openai -->' +export const COMMIT_ID_TAG = '<!-- commit_ids_reviewed_start -->' +export const COMMIT_ID_TAG_END = '<!-- commit_ids_reviewed_end -->' + export class Commenter { ...
:robot: OpenAI Instead of logging a warning and returning, it would be better to throw an error if both `context.payload.pull_request` and `context.payload.issue` are null. ```suggestion if (!context.payload.pull_request && !context.payload.issue) { throw new Error('Both context.payload.pull_request and context.pay...
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -61,7 +65,7 @@ ${tag}` } else if (mode === 'replace') { await this.replace(body, tag, target) } else { - core.warning(`Unknown mode: ${mode}, use "replace" instead`) + warning(`Unknown mode: ${mode}, use "replace" instead`) await this.replace(body, tag, target) }
:robot: OpenAI Instead of logging a warning and replacing the comment, it would be better to throw an error if an unknown mode is passed. ```suggestion if (mode === 'replace') { await this.replace(body, tag, target) } else if (mode === 'create') { await this.create(body) } else { throw new Error(`Unknown mode: ...
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -100,83 +104,71 @@ ${tag}` return lines.join('\n') }
:robot: OpenAI The `replace` function should have a more descriptive name, such as `replaceCommentBody`. ```suggestion async replaceCommentBody(body: string, tag: string, target: number) { ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -100,83 +104,71 @@ ${tag}` return lines.join('\n') } - get_description(description: string) { + getDescription(description: string) { return this.removeContentWithinTags( description, DESCRIPTION_TAG,
:robot: OpenAI The `create` function should have a more descriptive name, such as `createNewComment`. ```suggestion async createNewComment(body: string) { ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -100,83 +104,71 @@ ${tag}` return lines.join('\n') } - get_description(description: string) { + getDescription(description: string) { return this.removeContentWithinTags( description, DESCRIPTION_TAG, DESCRIPTION_TAG_END ) }
:robot: OpenAI The `update` function should have a more descriptive name, such as `updateExistingComment`. ```suggestion async updateExistingComment(body: string, commentId: number) { ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -100,83 +104,71 @@ ${tag}` return lines.join('\n') } - get_description(description: string) { + getDescription(description: string) { return this.removeContentWithinTags( description, DESCRIPTION_TAG, DESCRIPTION_TAG_END ) } - get_release_notes(description: string) { ...
:robot: OpenAI The `getComments` function should have a more descriptive name, such as `getCommentsForIssueOrPR`. ```suggestion async getCommentsForIssueOrPR(issueNumber: number) { ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -100,83 +104,71 @@ ${tag}` return lines.join('\n') } - get_description(description: string) { + getDescription(description: string) { return this.removeContentWithinTags( description, DESCRIPTION_TAG, DESCRIPTION_TAG_END ) } - get_release_notes(description: string) { ...
:robot: OpenAI The `deleteComment` function should have a more descriptive name, such as `deleteExistingComment`. ```suggestion async deleteExistingComment(commentId: number) { ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -100,83 +104,71 @@ ${tag}` return lines.join('\n') } - get_description(description: string) { + getDescription(description: string) { return this.removeContentWithinTags( description, DESCRIPTION_TAG, DESCRIPTION_TAG_END ) } - get_release_notes(description: string) { ...
:robot: OpenAI The `getCommentBody` function should have a more descriptive name, such as `getCommentBodyById`. ```suggestion async getCommentBodyById(commentId: number) { ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -100,83 +104,71 @@ ${tag}` return lines.join('\n') } - get_description(description: string) { + getDescription(description: string) { return this.removeContentWithinTags( description, DESCRIPTION_TAG, DESCRIPTION_TAG_END ) } - get_release_notes(description: string) { ...
:robot: OpenAI The `getCommentId` function should have a more descriptive name, such as `getCommentIdByTag`. ```suggestion async getCommentIdByTag(tag: string, issueNumber: number) { ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -100,83 +104,71 @@ ${tag}` return lines.join('\n') } - get_description(description: string) { + getDescription(description: string) { return this.removeContentWithinTags( description, DESCRIPTION_TAG, DESCRIPTION_TAG_END ) } - get_release_notes(description: string) { ...
:robot: OpenAI The `getCommentsByTag` function should have a more descriptive name, such as `getCommentsByTagForIssueOrPR`. ```suggestion async getCommentsByTagForIssueOrPR(tag: string, issueNumber: number) { ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -100,83 +104,71 @@ ${tag}` return lines.join('\n') } - get_description(description: string) { + getDescription(description: string) { return this.removeContentWithinTags( description, DESCRIPTION_TAG, DESCRIPTION_TAG_END ) } - get_release_notes(description: string) { ...
:robot: OpenAI The `getCommentIdsByTag` function should have a more descriptive name, such as `getCommentIdsByTagForIssueOrPR`. ```suggestion async getCommentIdsByTagForIssueOrPR(tag: string, issueNumber: number) { ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
227
coderabbitai
github-actions[bot]
@@ -100,83 +104,71 @@ ${tag}` return lines.join('\n') } - get_description(description: string) { + getDescription(description: string) { return this.removeContentWithinTags( description, DESCRIPTION_TAG, DESCRIPTION_TAG_END ) } - get_release_notes(description: string) { ...
:robot: OpenAI <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
226
coderabbitai
github-actions[bot]
@@ -0,0 +1,275 @@ +import {Inputs} from './inputs.js' + +export class Prompts { + summarize: string + summarize_release_notes: string
:robot: OpenAI The `prompts.ts` file has been completely removed. No review is necessary. <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
218
coderabbitai
github-actions[bot]
@@ -29,22 +29,19 @@ export class Prompts { render_summarize_file_diff(inputs: Inputs): string { const prompt = `${this.summarize_file_diff} -Below the summary, I would also like you to triage the diff -as \`NEEDS_REVIEW\` or \`APPROVED\` based on the following -criteria: +Below the summary, I would also lik...
:robot: OpenAI The new prompt provides clearer guidelines for triaging code changes based on their potential impact. However, the instructions could be further improved by providing more specific examples of what constitutes a minor change versus a modification to logic or functionality. Consider adding more detailed ...
ai-pr-reviewer
github_2023
typescript
218
coderabbitai
github-actions[bot]
@@ -155,7 +155,7 @@ export const codeReview = async ( } } } catch (error) { - core.warning(`Failed to get file contents: ${error}, skipping.`) + core.warning(`Failed to get file contents: ${error}`) }
:robot: OpenAI The error message should not be logged as a warning. It should be logged as an error instead. ```suggestion } catch (error) { core.error(`Failed to get file contents: ${error}`) } ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
218
coderabbitai
github-actions[bot]
@@ -324,12 +324,13 @@ ${filename}: ${summary} } // ask chatgpt to summarize the summaries const prompt = ` -Provided below are changesets in this pull request. -The format consists of filename(s) and the summary of changes -for those files. There is a separator between each changeset. +Provided be...
:robot: OpenAI The prompt is unclear and difficult to understand. Consider rephrasing it to make it more concise and easier to follow. Additionally, the prompt should be split into multiple lines for better readability. ```suggestion Provided below are changesets in this pull request. Changesets are in chronological o...
ai-pr-reviewer
github_2023
others
218
coderabbitai
github-actions[bot]
@@ -110,7 +110,7 @@ changes (`openai_light_model` in configuration) and `gpt-4` for more complex review and commenting tasks (`openai_heavy_model` in configuration).
:robot: OpenAI The phrase "review and commenting tasks" is vague. Please provide more specific details about what these tasks entail. ```suggestion # Please replace this line with a more specific description of the review and commenting tasks. ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
others
218
coderabbitai
github-actions[bot]
@@ -110,7 +110,7 @@ changes (`openai_light_model` in configuration) and `gpt-4` for more complex review and commenting tasks (`openai_heavy_model` in configuration). Costs: `gpt-3.5-turbo` is dirt cheap. `gpt-4` is orders of magnitude more -expensive, but the results are vastly superior. We are typically spending $...
:robot: OpenAI Please provide more context around the cost comparison between `gpt-3.5-turbo` and `gpt-4`. What are the specific benefits of using `gpt-4` that justify the increased cost? Also, please clarify whether the $20/day cost for `gpt-4` is per developer or for the entire team. ```suggestion # Please replace...
ai-pr-reviewer
github_2023
others
218
coderabbitai
github-actions[bot]
@@ -110,7 +110,7 @@ changes (`openai_light_model` in configuration) and `gpt-4` for more complex review and commenting tasks (`openai_heavy_model` in configuration). Costs: `gpt-3.5-turbo` is dirt cheap. `gpt-4` is orders of magnitude more -expensive, but the results are vastly superior. We are typically spending $...
:robot: OpenAI Please clarify whether the $20/day cost for `gpt-4` is per developer or for the entire team. ```suggestion # Please replace this line with a clarification of whether the $20/day cost for gpt-4 is per developer or for the entire team. ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
222
coderabbitai
github-actions[bot]
@@ -98,20 +98,46 @@ export const codeReview = async ( core.info(`Will review from commit: ${highest_reviewed_commit_id}`) } - // get the list of files changed between the highest reviewed commit - // and the latest (head) commit - // use octokit.pulls.compareCommits to get the list of files changed - // b...
:robot: OpenAI `octokit.repos.compareCommits()` is called twice with almost identical parameters. Consider refactoring this code to avoid duplication. One way to do this would be to create a function that takes in the `base` and `head` commit IDs as arguments and returns the diff between them. This function can then b...
ai-pr-reviewer
github_2023
typescript
219
coderabbitai
github-actions[bot]
@@ -42,6 +42,10 @@ Please evaluate the diff thoroughly and take into account factors such as the nu lines changed, the potential impact on the overall system, and the likelihood of introducing new bugs or security vulnerabilities. When in doubt, always err on the side of caution and triage the diff as \`NEEDS_REVI...
:robot: OpenAI The new hunk adds a strict format for triaging pull requests. It is good to have a standard format for triaging, but it would be helpful to provide more context on what `NEEDS_REVIEW` and `APPROVED` mean in this context. Also, it might be useful to add an example of how to use the format. Consider addin...
ai-pr-reviewer
github_2023
typescript
214
coderabbitai
github-actions[bot]
@@ -29,24 +29,22 @@ export class Prompts { render_summarize_file_diff(inputs: Inputs): string { const prompt = `${this.summarize_file_diff} -Below the summary, I would also like you to classify the complexity -of the diff as \`COMPLEX\` or \`SIMPLE\` based on the following +Below the summary, I would also l...
:robot: OpenAI The new hunk has replaced the old hunk that classified the complexity of the diff. The new hunk now asks for a triage system to evaluate diffs in the codebase. However, the instructions provided in the new hunk are not clear and may lead to confusion. It is recommended to provide more detailed instructi...
ai-pr-reviewer
github_2023
typescript
213
coderabbitai
github-actions[bot]
@@ -29,13 +29,23 @@ export class Prompts { render_summarize_file_diff(inputs: Inputs): string { const prompt = `${this.summarize_file_diff} -Below the summary, I would also like you to classify the -complexity of the diff as \`COMPLEX\` or \`SIMPLE\` based -on whether the diff is a simple change that looks ...
:robot: OpenAI The new prompt added to `render_summarize_file_diff` method is a good addition. However, the criteria for classifying the complexity of the diff seems incomplete and subjective. It would be better to provide more objective criteria such as the number of lines changed, the potential impact on the overall...
ai-pr-reviewer
github_2023
typescript
212
coderabbitai
github-actions[bot]
@@ -27,7 +27,21 @@ export class Prompts { } render_summarize_file_diff(inputs: Inputs): string {
:robot: OpenAI There's a missing backtick at the end of the `prompt` string. ```suggestion const prompt = `${this.summarize_file_diff}`; ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
212
coderabbitai
github-actions[bot]
@@ -27,7 +27,21 @@ export class Prompts { } render_summarize_file_diff(inputs: Inputs): string { - return inputs.render(this.summarize_file_diff) + const prompt = `${this.summarize_file_diff} + +Below the summary, I would also like you to classify the +complexity of the diff as \`COMPLEX\` or \`SIMPLE\` ...
:robot: OpenAI There's a missing space after the colon in the `[COMPLEXITY]:` tag. ```suggestion [COMPLEXITY]: <COMPLEX or SIMPLE> ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
212
coderabbitai
github-actions[bot]
@@ -217,7 +217,7 @@ ${hunks.old_hunk} filename: string, file_content: string, file_diff: string - ): Promise<[string, string] | null> => { + ): Promise<[string, string, boolean] | null> => { const ins = inputs.clone() if (file_diff.length === 0) { core.warning(`summarize: file_diff is ...
:robot: OpenAI Consider renaming the function `summarize_file_diff` to `summarize_complexity_of_file_diff` to reflect the new return type of `[string, string, boolean] | null`. <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
212
coderabbitai
github-actions[bot]
@@ -226,6 +226,7 @@ ${hunks.old_hunk} } ins.filename = filename + // render prompt based on inputs so far let tokens = tokenizer.get_token_count( prompts.render_summarize_file_diff(ins)
:robot: OpenAI The `filename` property is being set on the `ins` object but it is not clear what this object is used for. Consider adding a comment explaining the purpose of the `ins` object and how it is used in the subsequent code. <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
212
coderabbitai
github-actions[bot]
@@ -268,7 +269,15 @@ ${hunks.old_hunk} summaries_failed.push(`${filename} (nothing obtained from openai)`) return null } else { - return [filename, summarize_resp] + // parse the comment to look for complexity classification + // Format is : [COMPLEXITY]: <COMPLEX or SIMPLE...
:robot: OpenAI The logic for parsing the complexity classification from the OpenAI response seems brittle. It assumes that the format of the response will always be `[COMPLEXITY]: <COMPLEX or SIMPLE>` and that the complexity classification will always be on the first line after the `[COMPLEXITY]:` tag. If the format o...
ai-pr-reviewer
github_2023
typescript
212
coderabbitai
github-actions[bot]
@@ -293,7 +302,7 @@ ${hunks.old_hunk} const summaries = (await Promise.all(summaryPromises)).filter( summary => summary !== null - ) as [string, string][] + ) as [string, string, boolean][] if (summaries.length > 0) {
:robot: OpenAI The return type of the `summarizeFiles` function has changed from `[string, string][]` to `[string, string, boolean][]`. This change is not reflected in the function name and may cause confusion for users who are calling this function. Consider renaming the function to reflect the new return type. <!--...
ai-pr-reviewer
github_2023
typescript
212
coderabbitai
github-actions[bot]
@@ -420,6 +429,20 @@ ${ ` if (options.summary_only !== true) { + let files_and_changes_review = files_and_changes + const reviews_skipped: string[] = [] + // filter out files that are less complex and remove them from the review + // loop through summaries and check the complexity flag + for (const...
:robot: OpenAI The logic for filtering out files with low complexity seems correct, but it modifies the `files_and_changes_review` array in place. This can make the code harder to reason about and lead to bugs. Consider creating a new array instead of modifying the existing one. <!-- This is an auto-generated reply b...
ai-pr-reviewer
github_2023
typescript
212
coderabbitai
github-actions[bot]
@@ -684,7 +707,12 @@ ${comment_chain} } const reviewPromises = [] - for (const [filename, file_content, , patches] of files_and_changes) { + for (const [ + filename, + file_content, + , + patches + ] of files_and_changes_review) {
:robot: OpenAI The `patches` variable is unused in this loop. Consider removing it to make the code clearer. <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
212
coderabbitai
github-actions[bot]
@@ -710,6 +738,22 @@ ${ * ${reviews_failed.join('\n* ')} +</details> +` + : '' +} + +${ + reviews_skipped.length > 0 + ? `<details> +<summary>Files not reviewed due to simple changes (${ + reviews_skipped.length + })</summary> + +### Skipped review + +* ${reviews_skipped.join('\n* ')} + </detai...
:robot: OpenAI The logic for displaying skipped and failed reviews seems correct, but the formatting of the output could be improved. Consider using a table or bullet points to make the output easier to read. <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
212
coderabbitai
github-actions[bot]
@@ -27,7 +27,21 @@ export class Prompts { } render_summarize_file_diff(inputs: Inputs): string { - return inputs.render(this.summarize_file_diff) + const prompt = `${this.summarize_file_diff} + +Below the summary, I would also like you to classify the +complexity of the diff as \`COMPLEX\` or \`SIMPLE\` ...
:robot: OpenAI The implementation of classifying the complexity of the diff is not clear. Please provide more details on how this will be implemented and what criteria will be used to classify a change as complex or simple. Additionally, please consider adding comments to the code to make it more readable and maintain...
ai-pr-reviewer
github_2023
typescript
212
coderabbitai
github-actions[bot]
@@ -226,6 +226,7 @@ ${hunks.old_hunk} } ins.filename = filename + // render prompt based on inputs so far
:robot: OpenAI The `filename` variable is assigned to `ins.filename` on line 228. However, it is not clear what `ins` is and where it comes from. Consider adding a comment explaining what `ins` is and how it is related to `filename`. <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
212
coderabbitai
github-actions[bot]
@@ -293,7 +311,7 @@ ${hunks.old_hunk} const summaries = (await Promise.all(summaryPromises)).filter( summary => summary !== null - ) as [string, string][] + ) as [string, string, boolean][] if (summaries.length > 0) { // join summaries into one in the batches of 20
:robot: OpenAI The return type of the `summaries` array has changed from `[string, string][]` to `[string, string, boolean][]`. This change is not reflected in the code that follows and may cause issues. Consider updating the code that follows to handle the new return type. <!-- This is an auto-generated comment by O...
ai-pr-reviewer
github_2023
typescript
212
coderabbitai
github-actions[bot]
@@ -420,6 +438,20 @@ ${ ` if (options.summary_only !== true) { + let files_and_changes_review = files_and_changes + const reviews_skipped: string[] = [] + // filter out files that are less complex and remove them from the review + // loop through summaries and check the complexity flag + for (const...
:robot: OpenAI A new feature has been added to filter out files that are less complex and remove them from the review. This feature is implemented using the `summaries` array that is generated earlier in the code. While this feature is useful, it may be confusing for users who are not aware of this behavior. Consider ...
ai-pr-reviewer
github_2023
typescript
212
coderabbitai
github-actions[bot]
@@ -684,7 +716,12 @@ ${comment_chain} } const reviewPromises = [] - for (const [filename, file_content, , patches] of files_and_changes) { + for (const [ + filename, + file_content, + , + patches + ] of files_and_changes_review) { if (options.max_files <= 0 || reviewPromi...
:robot: OpenAI The `files_and_changes_review` array is initialized with `files_and_changes` on line 441. However, it is not clear why this is necessary and how it affects the review process. Consider adding a comment explaining why `files_and_changes_review` is needed and how it differs from `files_and_changes`. 747:...
ai-pr-reviewer
github_2023
typescript
212
coderabbitai
github-actions[bot]
@@ -27,7 +27,21 @@ export class Prompts { } render_summarize_file_diff(inputs: Inputs): string { - return inputs.render(this.summarize_file_diff) + const prompt = `${this.summarize_file_diff} + +Below the summary, I would also like you to classify the +complexity of the diff as \`COMPLEX\` or \`SIMPLE\` ...
:robot: OpenAI The comment is unclear and could be improved. Consider rephrasing it to something like: "Classify the complexity of the diff as either `COMPLEX` or `SIMPLE`. If the change is a simple chore that does not substantively change the logic/functionality of the code, then it is a simple change. Otherwise, if ...
ai-pr-reviewer
github_2023
typescript
212
coderabbitai
github-actions[bot]
@@ -27,7 +27,19 @@ export class Prompts { } render_summarize_file_diff(inputs: Inputs): string { - return inputs.render(this.summarize_file_diff) + const prompt = `${this.summarize_file_diff}
:robot: OpenAI The `summarize_file_diff` prompt is missing a closing backtick. ```suggestion const prompt = `${this.summarize_file_diff}` ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
212
coderabbitai
github-actions[bot]
@@ -27,7 +27,19 @@ export class Prompts { } render_summarize_file_diff(inputs: Inputs): string { - return inputs.render(this.summarize_file_diff) + const prompt = `${this.summarize_file_diff} + +Below the summary, I would also like you to classify the +complexity of the diff as \`COMPLEX\` or \`SIMPLE\` ...
:robot: OpenAI The new code adds a feature to classify the complexity of a diff as either `COMPLEX` or `SIMPLE` based on whether the change is a simple chore or a complex change that needs further review. However, the implementation is incomplete and does not actually classify the complexity of the diff. Please comple...
ai-pr-reviewer
github_2023
typescript
211
coderabbitai
github-actions[bot]
@@ -8,8 +8,7 @@ async function run(): Promise<void> { const options: Options = new Options( core.getBooleanInput('debug'), core.getBooleanInput('summary_only'), - core.getInput('max_files_to_summarize'), - core.getInput('max_files_to_review'), + core.getInput('max_files'),
:robot: OpenAI The `max_files` input is not defined. Did you mean to use `max_files_to_summarize` or `max_files_to_review`? ```suggestion core.getInput('max_files_to_summarize'), ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
others
211
coderabbitai
github-actions[bot]
@@ -1,10 +1,10 @@ -# OpenAI ChatGPT based PR reviewer and summarizer +# OpenAI ChatGPT-based PR reviewer and summarizer ![AI](./docs/images/ai.png) ## Overview -This [OpenAI ChatGPT](https://platform.openai.com/docs/guides/chat) based GitHub +This [OpenAI ChatGPT-based](https://platform.openai.com/docs/guides/c...
:robot: OpenAI The new hunk looks good. No substantive issues detected. ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
others
211
coderabbitai
github-actions[bot]
@@ -22,6 +22,8 @@ NOTES: has a [more conservative data usage policy](https://openai.com/policies/api-data-usage-policies) compared to their ChatGPT offering.
:robot: OpenAI The link to OpenAI's data usage policy is broken. Please update it to the correct URL. <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
others
211
coderabbitai
github-actions[bot]
@@ -22,6 +22,8 @@ NOTES: has a [more conservative data usage policy](https://openai.com/policies/api-data-usage-policies) compared to their ChatGPT offering. +- This action is not affiliated with OpenAI. +- This action is going through rapid iteration, so expect breaking changes.
:robot: OpenAI It's unclear what the purpose of these two lines is. Please provide more context or remove them. <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
others
211
coderabbitai
github-actions[bot]
@@ -178,7 +180,7 @@ $ npm run build && npm run package ## FAQs -### Review pull request from forks +### Review pull requests from forks GitHub Actions limits the access of secrets from forked repositories. To enable this feature, you need to use the `pull_request_target` event instead of
:robot: OpenAI Please provide more context on what `pull_request_target` event is and how it enables access to secrets from forked repositories. <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
211
coderabbitai
github-actions[bot]
@@ -47,7 +47,7 @@ export class Inputs { system_message: string title: string description: string - summary: string + raw_summary: string release_notes: string filename: string file_content: string
:robot: OpenAI The `Options` class has a new property `raw_summary` added to it. Please ensure that this property is being used correctly throughout the codebase. ``` ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
211
coderabbitai
github-actions[bot]
@@ -8,8 +8,7 @@ async function run(): Promise<void> { const options: Options = new Options( core.getBooleanInput('debug'), core.getBooleanInput('summary_only'), - core.getInput('max_files_to_summarize'), - core.getInput('max_files_to_review'), + core.getInput('max_files'), core.getBooleanInpu...
:robot: OpenAI The `path_filters` input is not specific enough. It should be either `summarize_path_filters` or `review_path_filters`, depending on the intended use. ```suggestion core.getMultilineInput('summarize_path_filters'), ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
others
211
coderabbitai
github-actions[bot]
@@ -22,6 +22,8 @@ NOTES: has a [more conservative data usage policy](https://openai.com/policies/api-data-usage-policies) compared to their ChatGPT offering. +- This action is not affiliated with OpenAI. +- This action is going through rapid iteration, so expect breaking changes. ## Usage
:robot: OpenAI No substantive issues were detected in this line range. <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
211
coderabbitai
github-actions[bot]
@@ -24,6 +24,11 @@ export const DESCRIPTION_TAG = export const DESCRIPTION_TAG_END = '<!-- end of auto-generated comment: release notes by openai -->' +export const RAW_SUMMARY_TAG = + '<!-- This is an auto-generated comment: raw summary by openai -->' +export const RAW_SUMMARY_TAG_END = + '<!-- end of auto-gen...
:robot: OpenAI The new constants `RAW_SUMMARY_TAG` and `RAW_SUMMARY_TAG_END` have been added to the code. These constants are used to identify the start and end of the raw summary generated by OpenAI. The `Commenter` class has also been modified to include a new method `getContentWithinTags()`. This method takes in a ...
ai-pr-reviewer
github_2023
typescript
211
coderabbitai
github-actions[bot]
@@ -61,32 +66,52 @@ ${tag}` } } - get_description(description: string) { - // remove our summary from description by looking for description_tag and description_tag_end - const start = description.indexOf(DESCRIPTION_TAG) - const end = description.indexOf(DESCRIPTION_TAG_END) + getContentWithinTags...
:robot: OpenAI The `getContentWithinTags()` and `removeContentWithinTags()` methods have been implemented. These methods take in a string, a start tag, and an end tag, and return the content between the start and end tags or remove the content between the start and end tags from the given string. <!-- This is an auto...
ai-pr-reviewer
github_2023
typescript
211
coderabbitai
github-actions[bot]
@@ -61,32 +66,52 @@ ${tag}` } } - get_description(description: string) { - // remove our summary from description by looking for description_tag and description_tag_end - const start = description.indexOf(DESCRIPTION_TAG) - const end = description.indexOf(DESCRIPTION_TAG_END) + getContentWithinTags...
:robot: OpenAI A new method `get_raw_summary()` has been added to the `Commenter` class. This method takes in a summary string and returns the raw summary generated by OpenAI. It does this by calling the `getContentWithinTags()` method with the `RAW_SUMMARY_TAG` and `RAW_SUMMARY_TAG_END` constants as arguments. It the...
ai-pr-reviewer
github_2023
others
211
coderabbitai
github-actions[bot]
@@ -9,14 +9,11 @@ inputs: required: false description: 'Enable debug mode' default: 'false' - max_files_to_summarize: + max_files: required: false description: - 'Max files to summarize. Less than or equal to 0 means no limit.' - default: '40' - max_files_to_review: - required: fa...
:robot: OpenAI The `max_files_to_summarize` and `max_files_to_review` options have been replaced with a single `max_files` option. The `review_comment_lgtm` option has been moved to a different location in the file. Please update the documentation accordingly. <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
others
211
coderabbitai
github-actions[bot]
@@ -109,7 +106,7 @@ inputs: disregarding minor issues. summarize_file_diff: required: false - description: 'The prompt for file' + description: 'The prompt for summarizing a file' default: |
:robot: OpenAI The description for the `summarize_file_diff` input is not accurate. Please update the description to reflect that this input is used for prompting the user to summarize a file diff. ```suggestion summarize_file_diff: required: false description: 'The prompt for summarizing a file diff' ...
ai-pr-reviewer
github_2023
others
211
coderabbitai
github-actions[bot]
@@ -124,7 +121,7 @@ inputs: $file_content ``` - Diff: + Diff for `$filename`: ```diff $file_diff ```
:robot: OpenAI The format of the diff output has been changed to include the filename before the diff. <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
others
211
coderabbitai
github-actions[bot]
@@ -134,17 +131,17 @@ inputs: required: false description: 'The prompt for final summarization response' default: | - Here is the summary of changes you have generated for each file: + Here is the summary of changes you have generated for files: ``` - $summary + $raw_summary ...
:robot: OpenAI The prompt for the final summarization response has been updated to reflect changes in the summary format. Please update the documentation accordingly. <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
211
coderabbitai
github-actions[bot]
@@ -74,7 +74,7 @@ export class Inputs { this.system_message = system_message this.title = title this.description = description - this.summary = summary + this.raw_summary = summary this.release_notes = release_notes this.filename = filename this.file_content = file_content
:robot: OpenAI The `Options` class has a new property `raw_summary` added to it. Please ensure that this property is being used correctly throughout the codebase. ``` ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
211
coderabbitai
github-actions[bot]
@@ -90,7 +90,7 @@ export class Inputs { this.system_message, this.title, this.description, - this.summary, + this.raw_summary, this.release_notes, this.filename, this.file_content,
:robot: OpenAI The `Options` class has a new property `raw_summary` added to it. Please ensure that this property is being used correctly throughout the codebase. ``` ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
211
coderabbitai
github-actions[bot]
@@ -115,8 +115,8 @@ export class Inputs { if (this.description) { content = content.replace('$description', this.description) } - if (this.summary) { - content = content.replace('$summary', this.summary) + if (this.raw_summary) { + content = content.replace('$raw_summary', this.raw_summ...
:robot: OpenAI The `Options` class has a new property `raw_summary` added to it. Please ensure that this property is being used correctly throughout the codebase. ``` ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
211
coderabbitai
github-actions[bot]
@@ -186,8 +186,7 @@ export class OpenAIOptions { export class Options { debug: boolean summary_only: boolean - max_files_to_summarize: number - max_files_to_review: number + max_files: number review_comment_lgtm: boolean path_filters: PathFilter system_message: string
:robot: OpenAI The `Options` class has two properties renamed: `max_files_to_summarize` to `max_files` and `max_files_to_review` to `review_comment_lgtm`. Please ensure that these properties are being used correctly throughout the codebase. ``` ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
211
coderabbitai
github-actions[bot]
@@ -203,8 +202,7 @@ export class Options { constructor( debug: boolean, summary_only: boolean, - max_files_to_summarize = '40', - max_files_to_review = '0', + max_files = '0', review_comment_lgtm = false, path_filters: string[] | null = null, system_message = '',
:robot: OpenAI The `Options` class has two properties renamed: `max_files_to_summarize` to `max_files` and `max_files_to_review` to `review_comment_lgtm`. Please ensure that these properties are being used correctly throughout the codebase. ``` ``` <!-- This is an auto-generated comment by OpenAI -->
ai-pr-reviewer
github_2023
typescript
211
coderabbitai
github-actions[bot]
@@ -217,8 +215,7 @@ export class Options { ) { this.debug = debug this.summary_only = summary_only - this.max_files_to_summarize = parseInt(max_files_to_summarize) - this.max_files_to_review = parseInt(max_files_to_review) + this.max_files = parseInt(max_files) this.review_comment_lgtm = revi...
:robot: OpenAI The `Options` class has two properties renamed: `max_files_to_summarize` to `max_files` and `max_files_to_review` to `review_comment_lgtm`. Please ensure that these properties are being used correctly throughout the codebase. ``` ``` <!-- This is an auto-generated comment by OpenAI -->