diff --git a/action/index.cjs b/action/index.cjs index 9576fef..56e5ba7 100644 --- a/action/index.cjs +++ b/action/index.cjs @@ -148196,8 +148196,9 @@ const robot = (app) => { base: commits[commits.length - 2].sha, head: commits[commits.length - 1].sha, }); + const ignoreList = (process.env.IGNORE || process.env.ignore || '').split('\n').filter(v => v !== ''); const filesNames = files?.map((file) => file.filename) || []; - changedFiles = changedFiles?.filter((file) => filesNames.includes(file.filename)); + changedFiles = changedFiles?.filter((file) => filesNames.includes(file.filename) && !ignoreList.includes(file.filename)); } if (!changedFiles?.length) { console.log('no target label attached'); @@ -148250,6 +148251,7 @@ class Chat { constructor(apikey) { this.chatAPI = new chatgpt_1.ChatGPTAPI({ apiKey: apikey, + apiBaseUrl: process.env.OPENAI_API_ENDPOINT || 'https://api.openai.com/v1', completionParams: { model: process.env.MODEL || 'gpt-3.5-turbo', temperature: +(process.env.temperature || 0) || 1, @@ -148262,7 +148264,7 @@ class Chat { ? `Answer me in ${process.env.LANGUAGE},` : ''; const prompt = process.env.PROMPT || - 'Bellow is the code patch, please help me do a brief code review, if any bug risk and improvement suggestion are welcome'; + 'Below is a code patch, please help me do a brief code review on it. Any bug risks and/or improvement suggestions are welcome:'; return `${prompt}, ${answerLanguage}: ${patch} `;