From 50095030c48ae64aa0c174e2232b8094a86356bb Mon Sep 17 00:00:00 2001 From: Mark Arts Date: Thu, 29 Feb 2024 09:31:32 +0100 Subject: [PATCH] allow extra instructions to be send to copilot --- src/main.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.ts b/src/main.ts index 13677ae..760ea96 100644 --- a/src/main.ts +++ b/src/main.ts @@ -8,6 +8,7 @@ import minimatch from "minimatch"; const GITHUB_TOKEN: string = core.getInput("GITHUB_TOKEN"); const OPENAI_API_KEY: string = core.getInput("OPENAI_API_KEY"); 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 }); @@ -86,6 +87,7 @@ function createPrompt(file: File, chunk: Chunk, prDetails: PRDetails): string { - Write the comment in GitHub Markdown format. - Use the given description only for the overall context and only comment the code. - IMPORTANT: NEVER suggest adding comments to the code. +${EXTRA_INSTRUCTIONS} Review the following code diff in the file "${ file.to