Skip to content
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

[No QA] Auto-check NO-QA PRs #6056

Merged
merged 4 commits into from
Oct 26, 2021
Merged
Show file tree
Hide file tree
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
17 changes: 13 additions & 4 deletions .github/actions/checkDeployBlockers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class GithubUtils {
* @param {String} tag
* @param {Array} PRList - The list of PR URLs which are included in this StagingDeployCash
* @param {Array} [verifiedPRList] - The list of PR URLs which have passed QA.
* @param {Array} [accessablePRList] - The list of PR URLs which have passed the accessability check.
* @param {Array} [accessiblePRList] - The list of PR URLs which have passed the accessability check.
* @param {Array} [deployBlockers] - The list of DeployBlocker URLs.
* @param {Array} [resolvedDeployBlockers] - The list of DeployBlockers URLs which have been resolved.
* @returns {Promise}
Expand All @@ -265,7 +265,7 @@ class GithubUtils {
tag,
PRList,
verifiedPRList = [],
accessablePRList = [],
accessiblePRList = [],
deployBlockers = [],
resolvedDeployBlockers = [],
) {
Expand All @@ -276,6 +276,15 @@ class GithubUtils {
'html_url',
);
console.log('Filtering out the following automated pull requests:', automatedPRs);

const noQAPRs = _.pluck(
_.filter(data, PR => (PR.title || '').toUpperCase().startsWith('[NO QA]')),
'html_url',
);
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);
const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs);

const sortedPRList = _.chain(PRList)
.difference(automatedPRs)
.unique()
Expand All @@ -295,8 +304,8 @@ class GithubUtils {
issueBody += '\r\n**This release contains changes from the following pull requests:**';
_.each(sortedPRList, (URL) => {
issueBody += `\r\n\r\n- ${URL}`;
issueBody += _.contains(verifiedPRList, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA';
issueBody += _.contains(accessablePRList, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility';
issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA';
issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility';
});
}

Expand Down
17 changes: 13 additions & 4 deletions .github/actions/createOrUpdateStagingDeploy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ class GithubUtils {
* @param {String} tag
* @param {Array} PRList - The list of PR URLs which are included in this StagingDeployCash
* @param {Array} [verifiedPRList] - The list of PR URLs which have passed QA.
* @param {Array} [accessablePRList] - The list of PR URLs which have passed the accessability check.
* @param {Array} [accessiblePRList] - The list of PR URLs which have passed the accessability check.
* @param {Array} [deployBlockers] - The list of DeployBlocker URLs.
* @param {Array} [resolvedDeployBlockers] - The list of DeployBlockers URLs which have been resolved.
* @returns {Promise}
Expand All @@ -394,7 +394,7 @@ class GithubUtils {
tag,
PRList,
verifiedPRList = [],
accessablePRList = [],
accessiblePRList = [],
deployBlockers = [],
resolvedDeployBlockers = [],
) {
Expand All @@ -405,6 +405,15 @@ class GithubUtils {
'html_url',
);
console.log('Filtering out the following automated pull requests:', automatedPRs);

const noQAPRs = _.pluck(
_.filter(data, PR => (PR.title || '').toUpperCase().startsWith('[NO QA]')),
'html_url',
);
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);
const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs);

const sortedPRList = _.chain(PRList)
.difference(automatedPRs)
.unique()
Expand All @@ -424,8 +433,8 @@ class GithubUtils {
issueBody += '\r\n**This release contains changes from the following pull requests:**';
_.each(sortedPRList, (URL) => {
issueBody += `\r\n\r\n- ${URL}`;
issueBody += _.contains(verifiedPRList, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA';
issueBody += _.contains(accessablePRList, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility';
issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA';
issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility';
});
}

Expand Down
17 changes: 13 additions & 4 deletions .github/actions/getPullRequestDetails/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ class GithubUtils {
* @param {String} tag
* @param {Array} PRList - The list of PR URLs which are included in this StagingDeployCash
* @param {Array} [verifiedPRList] - The list of PR URLs which have passed QA.
* @param {Array} [accessablePRList] - The list of PR URLs which have passed the accessability check.
* @param {Array} [accessiblePRList] - The list of PR URLs which have passed the accessability check.
* @param {Array} [deployBlockers] - The list of DeployBlocker URLs.
* @param {Array} [resolvedDeployBlockers] - The list of DeployBlockers URLs which have been resolved.
* @returns {Promise}
Expand All @@ -318,7 +318,7 @@ class GithubUtils {
tag,
PRList,
verifiedPRList = [],
accessablePRList = [],
accessiblePRList = [],
deployBlockers = [],
resolvedDeployBlockers = [],
) {
Expand All @@ -329,6 +329,15 @@ class GithubUtils {
'html_url',
);
console.log('Filtering out the following automated pull requests:', automatedPRs);

const noQAPRs = _.pluck(
_.filter(data, PR => (PR.title || '').toUpperCase().startsWith('[NO QA]')),
'html_url',
);
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);
const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs);

const sortedPRList = _.chain(PRList)
.difference(automatedPRs)
.unique()
Expand All @@ -348,8 +357,8 @@ class GithubUtils {
issueBody += '\r\n**This release contains changes from the following pull requests:**';
_.each(sortedPRList, (URL) => {
issueBody += `\r\n\r\n- ${URL}`;
issueBody += _.contains(verifiedPRList, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA';
issueBody += _.contains(accessablePRList, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility';
issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA';
issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility';
});
}

Expand Down
17 changes: 13 additions & 4 deletions .github/actions/getReleaseBody/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class GithubUtils {
* @param {String} tag
* @param {Array} PRList - The list of PR URLs which are included in this StagingDeployCash
* @param {Array} [verifiedPRList] - The list of PR URLs which have passed QA.
* @param {Array} [accessablePRList] - The list of PR URLs which have passed the accessability check.
* @param {Array} [accessiblePRList] - The list of PR URLs which have passed the accessability check.
* @param {Array} [deployBlockers] - The list of DeployBlocker URLs.
* @param {Array} [resolvedDeployBlockers] - The list of DeployBlockers URLs which have been resolved.
* @returns {Promise}
Expand All @@ -236,7 +236,7 @@ class GithubUtils {
tag,
PRList,
verifiedPRList = [],
accessablePRList = [],
accessiblePRList = [],
deployBlockers = [],
resolvedDeployBlockers = [],
) {
Expand All @@ -247,6 +247,15 @@ class GithubUtils {
'html_url',
);
console.log('Filtering out the following automated pull requests:', automatedPRs);

const noQAPRs = _.pluck(
_.filter(data, PR => (PR.title || '').toUpperCase().startsWith('[NO QA]')),
'html_url',
);
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);
const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs);

const sortedPRList = _.chain(PRList)
.difference(automatedPRs)
.unique()
Expand All @@ -266,8 +275,8 @@ class GithubUtils {
issueBody += '\r\n**This release contains changes from the following pull requests:**';
_.each(sortedPRList, (URL) => {
issueBody += `\r\n\r\n- ${URL}`;
issueBody += _.contains(verifiedPRList, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA';
issueBody += _.contains(accessablePRList, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility';
issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA';
issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility';
});
}

Expand Down
17 changes: 13 additions & 4 deletions .github/actions/isPullRequestMergeable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class GithubUtils {
* @param {String} tag
* @param {Array} PRList - The list of PR URLs which are included in this StagingDeployCash
* @param {Array} [verifiedPRList] - The list of PR URLs which have passed QA.
* @param {Array} [accessablePRList] - The list of PR URLs which have passed the accessability check.
* @param {Array} [accessiblePRList] - The list of PR URLs which have passed the accessability check.
* @param {Array} [deployBlockers] - The list of DeployBlocker URLs.
* @param {Array} [resolvedDeployBlockers] - The list of DeployBlockers URLs which have been resolved.
* @returns {Promise}
Expand All @@ -239,7 +239,7 @@ class GithubUtils {
tag,
PRList,
verifiedPRList = [],
accessablePRList = [],
accessiblePRList = [],
deployBlockers = [],
resolvedDeployBlockers = [],
) {
Expand All @@ -250,6 +250,15 @@ class GithubUtils {
'html_url',
);
console.log('Filtering out the following automated pull requests:', automatedPRs);

const noQAPRs = _.pluck(
_.filter(data, PR => (PR.title || '').toUpperCase().startsWith('[NO QA]')),
'html_url',
);
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);
const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs);

const sortedPRList = _.chain(PRList)
.difference(automatedPRs)
.unique()
Expand All @@ -269,8 +278,8 @@ class GithubUtils {
issueBody += '\r\n**This release contains changes from the following pull requests:**';
_.each(sortedPRList, (URL) => {
issueBody += `\r\n\r\n- ${URL}`;
issueBody += _.contains(verifiedPRList, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA';
issueBody += _.contains(accessablePRList, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility';
issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA';
issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility';
});
}

Expand Down
17 changes: 13 additions & 4 deletions .github/actions/isStagingDeployLocked/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class GithubUtils {
* @param {String} tag
* @param {Array} PRList - The list of PR URLs which are included in this StagingDeployCash
* @param {Array} [verifiedPRList] - The list of PR URLs which have passed QA.
* @param {Array} [accessablePRList] - The list of PR URLs which have passed the accessability check.
* @param {Array} [accessiblePRList] - The list of PR URLs which have passed the accessability check.
* @param {Array} [deployBlockers] - The list of DeployBlocker URLs.
* @param {Array} [resolvedDeployBlockers] - The list of DeployBlockers URLs which have been resolved.
* @returns {Promise}
Expand All @@ -217,7 +217,7 @@ class GithubUtils {
tag,
PRList,
verifiedPRList = [],
accessablePRList = [],
accessiblePRList = [],
deployBlockers = [],
resolvedDeployBlockers = [],
) {
Expand All @@ -228,6 +228,15 @@ class GithubUtils {
'html_url',
);
console.log('Filtering out the following automated pull requests:', automatedPRs);

const noQAPRs = _.pluck(
_.filter(data, PR => (PR.title || '').toUpperCase().startsWith('[NO QA]')),
'html_url',
);
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);
const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs);

const sortedPRList = _.chain(PRList)
.difference(automatedPRs)
.unique()
Expand All @@ -247,8 +256,8 @@ class GithubUtils {
issueBody += '\r\n**This release contains changes from the following pull requests:**';
_.each(sortedPRList, (URL) => {
issueBody += `\r\n\r\n- ${URL}`;
issueBody += _.contains(verifiedPRList, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA';
issueBody += _.contains(accessablePRList, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility';
issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA';
issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility';
});
}

Expand Down
17 changes: 13 additions & 4 deletions .github/actions/markPullRequestsAsDeployed/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ class GithubUtils {
* @param {String} tag
* @param {Array} PRList - The list of PR URLs which are included in this StagingDeployCash
* @param {Array} [verifiedPRList] - The list of PR URLs which have passed QA.
* @param {Array} [accessablePRList] - The list of PR URLs which have passed the accessability check.
* @param {Array} [accessiblePRList] - The list of PR URLs which have passed the accessability check.
* @param {Array} [deployBlockers] - The list of DeployBlocker URLs.
* @param {Array} [resolvedDeployBlockers] - The list of DeployBlockers URLs which have been resolved.
* @returns {Promise}
Expand All @@ -369,7 +369,7 @@ class GithubUtils {
tag,
PRList,
verifiedPRList = [],
accessablePRList = [],
accessiblePRList = [],
deployBlockers = [],
resolvedDeployBlockers = [],
) {
Expand All @@ -380,6 +380,15 @@ class GithubUtils {
'html_url',
);
console.log('Filtering out the following automated pull requests:', automatedPRs);

const noQAPRs = _.pluck(
_.filter(data, PR => (PR.title || '').toUpperCase().startsWith('[NO QA]')),
'html_url',
);
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);
const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs);

const sortedPRList = _.chain(PRList)
.difference(automatedPRs)
.unique()
Expand All @@ -399,8 +408,8 @@ class GithubUtils {
issueBody += '\r\n**This release contains changes from the following pull requests:**';
_.each(sortedPRList, (URL) => {
issueBody += `\r\n\r\n- ${URL}`;
issueBody += _.contains(verifiedPRList, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA';
issueBody += _.contains(accessablePRList, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility';
issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA';
issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility';
});
}

Expand Down
17 changes: 13 additions & 4 deletions .github/actions/reopenIssueWithComment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class GithubUtils {
* @param {String} tag
* @param {Array} PRList - The list of PR URLs which are included in this StagingDeployCash
* @param {Array} [verifiedPRList] - The list of PR URLs which have passed QA.
* @param {Array} [accessablePRList] - The list of PR URLs which have passed the accessability check.
* @param {Array} [accessiblePRList] - The list of PR URLs which have passed the accessability check.
* @param {Array} [deployBlockers] - The list of DeployBlocker URLs.
* @param {Array} [resolvedDeployBlockers] - The list of DeployBlockers URLs which have been resolved.
* @returns {Promise}
Expand All @@ -228,7 +228,7 @@ class GithubUtils {
tag,
PRList,
verifiedPRList = [],
accessablePRList = [],
accessiblePRList = [],
deployBlockers = [],
resolvedDeployBlockers = [],
) {
Expand All @@ -239,6 +239,15 @@ class GithubUtils {
'html_url',
);
console.log('Filtering out the following automated pull requests:', automatedPRs);

const noQAPRs = _.pluck(
_.filter(data, PR => (PR.title || '').toUpperCase().startsWith('[NO QA]')),
'html_url',
);
console.log('Found the following NO QA PRs:', noQAPRs);
const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs);
const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs);

const sortedPRList = _.chain(PRList)
.difference(automatedPRs)
.unique()
Expand All @@ -258,8 +267,8 @@ class GithubUtils {
issueBody += '\r\n**This release contains changes from the following pull requests:**';
_.each(sortedPRList, (URL) => {
issueBody += `\r\n\r\n- ${URL}`;
issueBody += _.contains(verifiedPRList, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA';
issueBody += _.contains(accessablePRList, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility';
issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA';
issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility';
});
}

Expand Down
Loading