Rollback the latest changes

This commit is contained in:
Gabriel Taylor Russ 2024-05-20 21:52:26 -07:00
commit 4327a34010
No known key found for this signature in database
GPG key ID: B50569075FAD6F11
3 changed files with 14 additions and 7 deletions

3
dist/index.js vendored
View file

@ -112,7 +112,10 @@ function createPrompt(file, chunk, prDetails) {
- Provide comments and suggestions ONLY if there is something to improve, otherwise "reviews" should be an empty array.
- Write the comment in GitHub Markdown format.
- Use the given description only for the overall context and only comment the code.
- Only return the most important issues.
- IMPORTANT: NEVER suggest adding comments to the code.
- IMPORTANT: Do not make suggestions related to code style.
- IMPORTANT: Do not make suggestions related to TODO comments.
Review the following code diff in the file "${file.to}" and take the pull request title and description into account when writing the response.

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -85,10 +85,14 @@ function createPrompt(file: File, chunk: Chunk, prDetails: PRDetails): string {
- Provide comments and suggestions ONLY if there is something to improve, otherwise "reviews" should be an empty array.
- Write the comment in GitHub Markdown format.
- Use the given description only for the overall context and only comment the code.
- Only return the most important issues.
- IMPORTANT: NEVER suggest adding comments to the code.
- IMPORTANT: Do not make suggestions related to code style.
- IMPORTANT: Do not make suggestions related to TODO comments.
Review the following code diff in the file "${file.to
}" and take the pull request title and description into account when writing the response.
Review the following code diff in the file "${
file.to
}" and take the pull request title and description into account when writing the response.
Pull request title: ${prDetails.title}
Pull request description:
@ -102,9 +106,9 @@ Git diff to review:
\`\`\`diff
${chunk.content}
${chunk.changes
// @ts-expect-error - ln and ln2 exists where needed
.map((c) => `${c.ln ? c.ln : c.ln2} ${c.content}`)
.join("\n")}
// @ts-expect-error - ln and ln2 exists where needed
.map((c) => `${c.ln ? c.ln : c.ln2} ${c.content}`)
.join("\n")}
\`\`\`
`;
}
@ -187,7 +191,7 @@ async function main() {
readFileSync(process.env.GITHUB_EVENT_PATH ?? "", "utf8")
);
let actionNames: string[] = ["opened", "labeled", "reopened"]
let actionNames: string[] = ["opened", "labeled", "reopened"];
if (actionNames.includes(eventData.action)) {
diff = await getDiff(