This commit is contained in:
ChangMin Lim 2024-02-28 09:20:47 +00:00 committed by GitHub
commit b07234797c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 1312 additions and 1298 deletions

View file

@ -11,6 +11,10 @@ inputs:
description: "OpenAI API model."
required: false
default: "gpt-4"
LANGUAGE:
description: "Language for the code review."
required: false
default: "English"
exclude:
description: "Glob patterns to exclude files from the diff analysis"
required: false

2599
dist/index.js vendored

File diff suppressed because it is too large Load diff

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -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 LANGUAGE: string = core.getInput("LANGUAGE");
const octokit = new Octokit({ auth: GITHUB_TOKEN });
@ -135,6 +136,10 @@ async function getAIResponse(prompt: string): Promise<Array<{
role: "system",
content: prompt,
},
{
role: "system",
content: `(OOC: Answer in ${LANGUAGE})`
}
],
});