diff --git a/.circleci/scripts/git-diff-develop.ts b/.circleci/scripts/git-diff-develop.ts index 43435db17418..f4437d6154db 100644 --- a/.circleci/scripts/git-diff-develop.ts +++ b/.circleci/scripts/git-diff-develop.ts @@ -20,6 +20,7 @@ type PRInfo = { ref: string; }; body: string; + labels: { name: string }[]; }; /** @@ -123,7 +124,7 @@ async function storeGitDiffOutputAndPrBody() { fs.mkdirSync(CHANGED_FILES_DIR, { recursive: true }); console.log( - `Determining whether this run is for a PR targeting ${MAIN_BRANCH}`, + `Determining whether to run git diff...`, ); if (!PR_NUMBER) { console.log('Not a PR, skipping git diff'); @@ -140,6 +141,9 @@ async function storeGitDiffOutputAndPrBody() { console.log(`This is for a PR targeting '${baseRef}', skipping git diff`); writePrBodyToFile(prInfo.body); return; + } else if (prInfo.labels.some(label => label.name === 'skip-e2e-quality-gate')) { + console.log('PR has the skip-e2e-quality-gate label, skipping git diff'); + return; } console.log('Attempting to get git diff...');