diff --git a/scripts/changed_prompt.js b/scripts/changed_prompt.js index 90c8638cb4..69ef2e0eaf 100644 --- a/scripts/changed_prompt.js +++ b/scripts/changed_prompt.js @@ -11,9 +11,10 @@ const EVALS_FILE_PREFIXES = [ ]; function main() { + const targetBranch = process.env.GITHUB_BASE_REF || 'main'; try { - // Fetch main branch from origin. - execSync('git fetch origin main', { + // Fetch target branch from origin. + execSync(`git fetch origin ${targetBranch}`, { stdio: 'ignore', });