mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-04-20 09:36:47 +00:00
allow extra instructions to be send to copilot
This commit is contained in:
parent
a9a064dfa1
commit
50095030c4
1 changed files with 2 additions and 0 deletions
|
@ -8,6 +8,7 @@ import minimatch from "minimatch";
|
||||||
const GITHUB_TOKEN: string = core.getInput("GITHUB_TOKEN");
|
const GITHUB_TOKEN: string = core.getInput("GITHUB_TOKEN");
|
||||||
const OPENAI_API_KEY: string = core.getInput("OPENAI_API_KEY");
|
const OPENAI_API_KEY: string = core.getInput("OPENAI_API_KEY");
|
||||||
const OPENAI_API_MODEL: string = core.getInput("OPENAI_API_MODEL");
|
const OPENAI_API_MODEL: string = core.getInput("OPENAI_API_MODEL");
|
||||||
|
const EXTRA_INSTRUCTIONS: string = core.getInput("EXTRA_INSTRUCTIONS");
|
||||||
|
|
||||||
const octokit = new Octokit({ auth: GITHUB_TOKEN });
|
const octokit = new Octokit({ auth: GITHUB_TOKEN });
|
||||||
|
|
||||||
|
@ -86,6 +87,7 @@ function createPrompt(file: File, chunk: Chunk, prDetails: PRDetails): string {
|
||||||
- Write the comment in GitHub Markdown format.
|
- Write the comment in GitHub Markdown format.
|
||||||
- Use the given description only for the overall context and only comment the code.
|
- Use the given description only for the overall context and only comment the code.
|
||||||
- IMPORTANT: NEVER suggest adding comments to the code.
|
- IMPORTANT: NEVER suggest adding comments to the code.
|
||||||
|
${EXTRA_INSTRUCTIONS}
|
||||||
|
|
||||||
Review the following code diff in the file "${
|
Review the following code diff in the file "${
|
||||||
file.to
|
file.to
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue