mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-04-20 01:26:47 +00:00
Optimised code review for terraform
This commit is contained in:
parent
79fc10f459
commit
957041bce3
1 changed files with 10 additions and 0 deletions
10
src/main.ts
10
src/main.ts
|
@ -171,6 +171,14 @@ function getCypressGuidelines(): string {
|
|||
`;
|
||||
}
|
||||
|
||||
function getTerraformGuidelines(): string {
|
||||
return `
|
||||
- **Avoid duplicate review comments**: If the same comment applies to multiple lines within the same file or across different files, consolidate your feedback and leave a single comment. Reference the relevant line numbers and files where the changes are needed.
|
||||
- **Ignore reviewing commentlines**: Ignore reviewing newly added or edited commentlines in the code.
|
||||
- **Ignore reviewing boolean variables**: Ignore reviewing boolean values in environment YAML config files.
|
||||
`;
|
||||
}
|
||||
|
||||
function createPrompt(file: File, chunk: Chunk, prDetails: PRDetails): string {
|
||||
let guidelines = "";
|
||||
|
||||
|
@ -182,6 +190,8 @@ function createPrompt(file: File, chunk: Chunk, prDetails: PRDetails): string {
|
|||
guidelines = getAngularJSGuidelines();
|
||||
} else if (FRAMEWORK === "Cypress") {
|
||||
guidelines = getCypressGuidelines();
|
||||
} else if (FRAMEWORK === "Terraform") {
|
||||
guidelines = getTerraformGuidelines();
|
||||
}
|
||||
|
||||
return `Your task is to review a pull request for ${FRAMEWORK} code. Follow these instructions:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue