diff --git a/.github/actions/checkDeployBlockers/index.js b/.github/actions/checkDeployBlockers/index.js index 0b4fd2de93a2..e96a364e75d8 100644 --- a/.github/actions/checkDeployBlockers/index.js +++ b/.github/actions/checkDeployBlockers/index.js @@ -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} @@ -265,7 +265,7 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessablePRList = [], + accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], ) { @@ -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() @@ -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'; }); } diff --git a/.github/actions/createOrUpdateStagingDeploy/index.js b/.github/actions/createOrUpdateStagingDeploy/index.js index 9d593ea8eff3..13c93feb2d24 100644 --- a/.github/actions/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/createOrUpdateStagingDeploy/index.js @@ -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} @@ -394,7 +394,7 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessablePRList = [], + accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], ) { @@ -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() @@ -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'; }); } diff --git a/.github/actions/getPullRequestDetails/index.js b/.github/actions/getPullRequestDetails/index.js index 7231917e17fd..783bebbfb767 100644 --- a/.github/actions/getPullRequestDetails/index.js +++ b/.github/actions/getPullRequestDetails/index.js @@ -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} @@ -318,7 +318,7 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessablePRList = [], + accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], ) { @@ -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() @@ -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'; }); } diff --git a/.github/actions/getReleaseBody/index.js b/.github/actions/getReleaseBody/index.js index 179b1366edf9..8e11a6eff2e7 100644 --- a/.github/actions/getReleaseBody/index.js +++ b/.github/actions/getReleaseBody/index.js @@ -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} @@ -236,7 +236,7 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessablePRList = [], + accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], ) { @@ -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() @@ -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'; }); } diff --git a/.github/actions/isPullRequestMergeable/index.js b/.github/actions/isPullRequestMergeable/index.js index 1e5e7cd8d462..a03b65a8974c 100644 --- a/.github/actions/isPullRequestMergeable/index.js +++ b/.github/actions/isPullRequestMergeable/index.js @@ -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} @@ -239,7 +239,7 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessablePRList = [], + accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], ) { @@ -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() @@ -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'; }); } diff --git a/.github/actions/isStagingDeployLocked/index.js b/.github/actions/isStagingDeployLocked/index.js index 4931d6be48a0..c9f88fa7e1c5 100644 --- a/.github/actions/isStagingDeployLocked/index.js +++ b/.github/actions/isStagingDeployLocked/index.js @@ -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} @@ -217,7 +217,7 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessablePRList = [], + accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], ) { @@ -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() @@ -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'; }); } diff --git a/.github/actions/markPullRequestsAsDeployed/index.js b/.github/actions/markPullRequestsAsDeployed/index.js index 8b860e134621..8396d17e27cc 100644 --- a/.github/actions/markPullRequestsAsDeployed/index.js +++ b/.github/actions/markPullRequestsAsDeployed/index.js @@ -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} @@ -369,7 +369,7 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessablePRList = [], + accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], ) { @@ -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() @@ -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'; }); } diff --git a/.github/actions/reopenIssueWithComment/index.js b/.github/actions/reopenIssueWithComment/index.js index cbb9ed8bd4a5..6e2278280df4 100644 --- a/.github/actions/reopenIssueWithComment/index.js +++ b/.github/actions/reopenIssueWithComment/index.js @@ -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} @@ -228,7 +228,7 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessablePRList = [], + accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], ) { @@ -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() @@ -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'; }); } diff --git a/.github/actions/triggerWorkflowAndWait/index.js b/.github/actions/triggerWorkflowAndWait/index.js index 759d546013d5..d6c4df3c8277 100644 --- a/.github/actions/triggerWorkflowAndWait/index.js +++ b/.github/actions/triggerWorkflowAndWait/index.js @@ -370,7 +370,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} @@ -379,7 +379,7 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessablePRList = [], + accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], ) { @@ -390,6 +390,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() @@ -409,8 +418,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'; }); } diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index 9d3ee3ae094c..94f242a81b53 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -168,7 +168,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} @@ -177,7 +177,7 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessablePRList = [], + accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], ) { @@ -188,6 +188,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() @@ -207,8 +216,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'; }); } diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index d702f85941fa..dff5e60a7b49 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -236,28 +236,46 @@ describe('GithubUtils', () => { const mockPRs = [ { number: 1, + title: 'Test PR 1', html_url: 'https://github.com/Expensify/App/pull/1', user: {login: 'testUser'}, labels: [], }, { number: 2, + title: 'Test PR 2', html_url: 'https://github.com/Expensify/App/pull/2', user: {login: 'testUser'}, labels: [], }, { number: 3, + title: 'Test PR 3', html_url: 'https://github.com/Expensify/App/pull/3', user: {login: 'testUser'}, labels: [], }, { number: 4, + title: 'Test Automated PR', html_url: 'https://github.com/Expensify/App/pull/4', user: {login: 'OSBotify'}, labels: [{name: 'automerge'}], }, + { + number: 5, + title: '[No QA] Test No QA PR uppercase', + html_url: 'https://github.com/Expensify/App/pull/5', + user: {login: 'testUser'}, + labels: [], + }, + { + number: 6, + title: '[No QA] Test No QA PR Title Case', + html_url: 'https://github.com/Expensify/App/pull/6', + user: {login: 'testUser'}, + labels: [], + }, ]; const mockGithub = jest.fn(() => ({ getOctokit: () => ({ @@ -279,8 +297,10 @@ describe('GithubUtils', () => { 'https://github.com/Expensify/App/pull/2', 'https://github.com/Expensify/App/pull/3', 'https://github.com/Expensify/App/pull/1', - 'https://github.com/Expensify/App/pull/4', + 'https://github.com/Expensify/App/pull/4', // Automated 'https://github.com/Expensify/App/pull/3', // This is an intentional duplicate for testing duplicates + 'https://github.com/Expensify/App/pull/5', // No QA + 'https://github.com/Expensify/App/pull/6', // No QA ]; const baseDeployBlockerList = [ @@ -305,7 +325,9 @@ describe('GithubUtils', () => { const allVerifiedExpectedOutput = `${baseExpectedOutput}` + `${lineBreakDouble}${listStart}${basePRList[2]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` + `${lineBreakDouble}${listStart}${basePRList[0]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` - + `${lineBreakDouble}${listStart}${basePRList[1]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}`; + + `${lineBreakDouble}${listStart}${basePRList[1]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[5]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[6]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}`; test('Test no verified PRs', () => ( @@ -316,6 +338,8 @@ describe('GithubUtils', () => { + `${lineBreakDouble}${listStart}${basePRList[2]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` + `${lineBreakDouble}${listStart}${basePRList[0]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` + `${lineBreakDouble}${listStart}${basePRList[1]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[5]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[6]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` + `${lineBreakDouble}${ccApplauseLeads}`, ); }) @@ -329,6 +353,8 @@ describe('GithubUtils', () => { + `${lineBreakDouble}${listStart}${basePRList[2]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` + `${lineBreakDouble}${listStart}${basePRList[0]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` + `${lineBreakDouble}${listStart}${basePRList[1]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[5]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[6]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` + `${lineBreakDouble}${ccApplauseLeads}`, ); }) @@ -342,6 +368,8 @@ describe('GithubUtils', () => { + `${lineBreakDouble}${listStart}${basePRList[2]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` + `${lineBreakDouble}${listStart}${basePRList[0]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` + `${lineBreakDouble}${listStart}${basePRList[1]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[5]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[6]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` + `${lineBreakDouble}${ccApplauseLeads}`, ); }) @@ -390,6 +418,8 @@ describe('GithubUtils', () => { + `${lineBreakDouble}${listStart}${basePRList[2]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` + `${lineBreakDouble}${listStart}${basePRList[0]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` + `${lineBreakDouble}${listStart}${basePRList[1]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[5]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[6]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` + `${lineBreakDouble}${deployBlockerHeader}` + `${lineBreak}${closedCheckbox}${baseDeployBlockerList[0]}` + `${lineBreak}${closedCheckbox}${baseDeployBlockerList[1]}`