Skip to content

fix: Add e2e label check #14542

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/scripts/check-pr-has-required-labels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,28 @@ async function main(): Promise<void> {
];
let hasTeamLabel = false;
let hasQALabel = false;

let hasSmokeE2ELabel = false;
// Check pull request has at least required QA label and team label
for (const label of pullRequestLabels) {
if (label.startsWith('team-') || label === externalContributorLabel.name) {
console.log(`PR contains a team label as expected: ${label}`);
hasTeamLabel = true;
}
if (label.includes('Run Smoke E2E') || label.includes('No QA Needed') || label.includes('QA Passed') ) {
if (label.includes('No QA Needed') || label.includes('QA Passed') ) {
console.log(`PR contains a QA label as expected: ${label}`);
hasQALabel = true;
}
if (label.includes('Run Smoke E2E') || label.includes('No E2E Smoke Needed')) {
console.log(`PR contains a Smoke E2E label as expected: ${label}`);
hasSmokeE2ELabel = true;
}
if (preventMergeLabels.includes(label)) {
core.setFailed(
`PR cannot be merged because it still contains this label: ${label}`,
);
process.exit(1);
}
if (hasTeamLabel && hasQALabel) {
if (hasTeamLabel && hasQALabel && hasSmokeE2ELabel) {
return;
}
}
Expand Down
Loading