fix(core): copilot test condition & retry (#8665)

This commit is contained in:
darkskygit
2024-11-04 06:17:06 +00:00
parent ee16ea7a5a
commit 2e7a7d5909
3 changed files with 19 additions and 16 deletions
+4 -4
View File
@@ -65,13 +65,13 @@ async function findPackageJson(root) {
}
async function main() {
if (process.argv.length < 3) {
console.error('Usage: node script.js <commit-hash>');
const commitHash = process.argv[2] || process.env.GITHUB_BASE_REF;
const currentHead = process.argv[3] || 'HEAD';
if (!commitHash) {
console.error('Missing base ref commit hash, skipping check.');
process.exit(1);
}
const commitHash = process.argv[2];
const currentHead = process.argv[3] || 'HEAD';
const changedPackages = new Set();
const folders = await findPackageJson(
join(fileURLToPath(import.meta.url), '..', '..')