Skip to content

Commit

Permalink
chore: e2e quality gate enhancement (#28206)
Browse files Browse the repository at this point in the history
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

With the label:

![Screenshot from 2024-10-31
12-02-14](https://github.com/user-attachments/assets/c112d2b3-4099-4bbd-bde2-1c97df04f9a4)

When removing the label:

![Screenshot from 2024-10-31
12-11-56](https://github.com/user-attachments/assets/b8591786-b91d-4a11-9f4c-ba09c9f407d5)



[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28206?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

1. See here, were we skip the git diff as it had the label
https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/108789/workflows/01710cd9-1a1b-4c47-8f66-3796d57ea732/jobs/4069000

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
  • Loading branch information
seaona authored Nov 6, 2024
1 parent e5b415f commit 10102d0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .circleci/scripts/git-diff-develop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type PRInfo = {
ref: string;
};
body: string;
labels: { name: string }[];
};

/**
Expand Down Expand Up @@ -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');
Expand All @@ -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...');
Expand Down

0 comments on commit 10102d0

Please sign in to comment.