From fa2ab766c5598f40ada35eed01bcd89781e981b5 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 8 Jul 2022 11:51:49 -0600 Subject: [PATCH 01/41] Remove accessibility logic to return qa checklist to how it used to look --- .../javascript/checkDeployBlockers/index.js | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/.github/actions/javascript/checkDeployBlockers/index.js b/.github/actions/javascript/checkDeployBlockers/index.js index 6d7c26639615..ce33ead85638 100644 --- a/.github/actions/javascript/checkDeployBlockers/index.js +++ b/.github/actions/javascript/checkDeployBlockers/index.js @@ -26,7 +26,7 @@ const run = function () { console.log('Checking for unverified PRs or unresolved deploy blockers', data); // Check the issue description to see if there are any unfinished/un-QAed items in the checklist. - const uncheckedBoxRegex = /-\s\[\s]\s(?!Accessibility)/; + const uncheckedBoxRegex = /-\s\[\s]\s/; if (uncheckedBoxRegex.test(data.body)) { console.log('An unverified PR or unresolved deploy blocker was found.'); core.setOutput('HAS_DEPLOY_BLOCKERS', true); @@ -214,7 +214,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*(?:\r?\n)*((?:.*\r?\n(?:\s+-\s.*\r?\n)+\r?\n)+)/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -222,12 +222,11 @@ class GithubUtils { } PRListSection = PRListSection[1]; const PRList = _.map( - [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[([ x])] QA\\s+- \\[([ x])] Accessibility`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- \\[ ] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ url: match[1], number: Number.parseInt(match[2], 10), isVerified: match[3] === 'x', - isAccessible: match[4] === 'x', }), ); const internalQAPRList = this.getStagingDeployCashInternalQA(issue); @@ -291,7 +290,6 @@ 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} [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. * @param {Boolean} [isTimingDashboardChecked] @@ -302,7 +300,6 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], isTimingDashboardChecked = false, @@ -333,7 +330,6 @@ class GithubUtils { ); 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) @@ -354,9 +350,8 @@ class GithubUtils { if (!_.isEmpty(sortedPRList)) { issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += `\r\n\r\n- ${URL}`; - issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; - issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; + issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; + issueBody += ` ${URL}\r\n`; }); } @@ -12111,7 +12106,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12124,7 +12119,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12133,14 +12128,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup From 0797a458d01a438383df5f974c16a6cc238355b2 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 8 Jul 2022 11:52:22 -0600 Subject: [PATCH 02/41] Remove unnecessary logic now that accessibility is not on the checklist --- .../javascript/checkDeployBlockers/checkDeployBlockers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/javascript/checkDeployBlockers/checkDeployBlockers.js b/.github/actions/javascript/checkDeployBlockers/checkDeployBlockers.js index 4862f0dd9d58..83613712d202 100644 --- a/.github/actions/javascript/checkDeployBlockers/checkDeployBlockers.js +++ b/.github/actions/javascript/checkDeployBlockers/checkDeployBlockers.js @@ -16,7 +16,7 @@ const run = function () { console.log('Checking for unverified PRs or unresolved deploy blockers', data); // Check the issue description to see if there are any unfinished/un-QAed items in the checklist. - const uncheckedBoxRegex = /-\s\[\s]\s(?!Accessibility)/; + const uncheckedBoxRegex = /-\s\[\s]\s/; if (uncheckedBoxRegex.test(data.body)) { console.log('An unverified PR or unresolved deploy blocker was found.'); core.setOutput('HAS_DEPLOY_BLOCKERS', true); From 056f7765f459ff97fe645f29f88aed0355563aef Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 8 Jul 2022 11:58:28 -0600 Subject: [PATCH 03/41] Remove accessibility logic now that it is no longer being checked --- .../createOrUpdateStagingDeploy.js | 4 +-- .../createOrUpdateStagingDeploy/index.js | 33 ++++++++----------- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js b/.github/actions/javascript/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js index 854349998902..6bab55478bb9 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js @@ -102,9 +102,8 @@ const run = function () { // Since this is the second argument to _.union, // it will appear later in the array than any duplicate. // Since it is later in the array, it will be truncated by _.unique, - // and the original value of isVerified and isAccessible will be preserved. + // and the original value of isVerified will be preserved. isVerified: false, - isAccessible: false, }))), false, item => item.number, @@ -126,7 +125,6 @@ const run = function () { tag, _.pluck(PRList, 'url'), _.pluck(_.where(PRList, {isVerified: true}), 'url'), - _.pluck(_.where(PRList, {isAccessible: true}), 'url'), _.pluck(deployBlockers, 'url'), _.pluck(_.where(deployBlockers, {isResolved: true}), 'url'), didVersionChange ? false : currentStagingDeployCashData.isTimingDashboardChecked, diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index 155d321bac76..193636ff34b3 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -112,9 +112,8 @@ const run = function () { // Since this is the second argument to _.union, // it will appear later in the array than any duplicate. // Since it is later in the array, it will be truncated by _.unique, - // and the original value of isVerified and isAccessible will be preserved. + // and the original value of isVerified will be preserved. isVerified: false, - isAccessible: false, }))), false, item => item.number, @@ -136,7 +135,6 @@ const run = function () { tag, _.pluck(PRList, 'url'), _.pluck(_.where(PRList, {isVerified: true}), 'url'), - _.pluck(_.where(PRList, {isAccessible: true}), 'url'), _.pluck(deployBlockers, 'url'), _.pluck(_.where(deployBlockers, {isResolved: true}), 'url'), didVersionChange ? false : currentStagingDeployCashData.isTimingDashboardChecked, @@ -407,7 +405,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*(?:\r?\n)*((?:.*\r?\n(?:\s+-\s.*\r?\n)+\r?\n)+)/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -415,12 +413,11 @@ class GithubUtils { } PRListSection = PRListSection[1]; const PRList = _.map( - [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[([ x])] QA\\s+- \\[([ x])] Accessibility`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ url: match[1], number: Number.parseInt(match[2], 10), - isVerified: match[3] === 'x', - isAccessible: match[4] === 'x', + isVerified: match[0] === 'x', }), ); const internalQAPRList = this.getStagingDeployCashInternalQA(issue); @@ -484,7 +481,6 @@ 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} [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. * @param {Boolean} [isTimingDashboardChecked] @@ -495,7 +491,6 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], isTimingDashboardChecked = false, @@ -526,7 +521,6 @@ class GithubUtils { ); 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) @@ -547,9 +541,8 @@ class GithubUtils { if (!_.isEmpty(sortedPRList)) { issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += `\r\n\r\n- ${URL}`; - issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; - issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; + issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; + issueBody += ` ${URL}\r\n`; }); } @@ -17989,7 +17982,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -18002,7 +17995,7 @@ module.exports = require("zlib");; /******/ loaded: false, /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -18011,14 +18004,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Flag the module as loaded /******/ module.loaded = true; -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/node module decorator */ /******/ (() => { @@ -18028,9 +18021,9 @@ module.exports = require("zlib");; /******/ return module; /******/ }; /******/ })(); -/******/ +/******/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup From 16247b95d46919a50c11364dc7de3f3643f2cbae Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 8 Jul 2022 12:10:16 -0600 Subject: [PATCH 04/41] Remove accessibility logic from getPullRequestDetails now that it is no longer being checked --- .../javascript/getPullRequestDetails/index.js | 28 ++++++++----------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/.github/actions/javascript/getPullRequestDetails/index.js b/.github/actions/javascript/getPullRequestDetails/index.js index 24262b7e6bd8..10f18cf40e48 100644 --- a/.github/actions/javascript/getPullRequestDetails/index.js +++ b/.github/actions/javascript/getPullRequestDetails/index.js @@ -285,7 +285,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*(?:\r?\n)*((?:.*\r?\n(?:\s+-\s.*\r?\n)+\r?\n)+)/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -293,12 +293,11 @@ class GithubUtils { } PRListSection = PRListSection[1]; const PRList = _.map( - [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[([ x])] QA\\s+- \\[([ x])] Accessibility`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ url: match[1], number: Number.parseInt(match[2], 10), - isVerified: match[3] === 'x', - isAccessible: match[4] === 'x', + isVerified: match[0] === 'x', }), ); const internalQAPRList = this.getStagingDeployCashInternalQA(issue); @@ -336,7 +335,7 @@ class GithubUtils { * @private * * @param {Object} issue - * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean, isAccessible: Boolean}] + * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashInternalQA(issue) { let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:- \[[ x]].*\r?\n)+)/) || []; @@ -350,7 +349,6 @@ class GithubUtils { url: match[2], number: Number.parseInt(match[3], 10), isResolved: match[1] === 'x', - isAccessible: false, }), ); return _.sortBy(internalQAPRs, 'number'); @@ -362,7 +360,6 @@ 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} [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. * @param {Boolean} [isTimingDashboardChecked] @@ -373,7 +370,6 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], isTimingDashboardChecked = false, @@ -404,7 +400,6 @@ class GithubUtils { ); 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) @@ -425,9 +420,8 @@ class GithubUtils { if (!_.isEmpty(sortedPRList)) { issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += `\r\n\r\n- ${URL}`; - issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; - issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; + issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x]' : '\r\n - [ ]'; + issueBody += ` ${URL}`; }); } @@ -12182,7 +12176,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12195,7 +12189,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12204,14 +12198,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup From cd04bad0383d89720008887dd1e7b005596fa3ba Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 8 Jul 2022 12:14:52 -0600 Subject: [PATCH 05/41] Remove accessibility logic from getReleaseBody --- .github/actions/getReleaseBody/index.js | 28 ++++++++++--------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/.github/actions/getReleaseBody/index.js b/.github/actions/getReleaseBody/index.js index 36fe167d6db3..5f1d6f404330 100644 --- a/.github/actions/getReleaseBody/index.js +++ b/.github/actions/getReleaseBody/index.js @@ -203,7 +203,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*(?:\r?\n)*((?:.*\r?\n(?:\s+-\s.*\r?\n)+\r?\n)+)/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -211,12 +211,11 @@ class GithubUtils { } PRListSection = PRListSection[1]; const PRList = _.map( - [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[([ x])] QA\\s+- \\[([ x])] Accessibility`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ url: match[1], number: Number.parseInt(match[2], 10), - isVerified: match[3] === 'x', - isAccessible: match[4] === 'x', + isVerified: match[0] === 'x', }), ); const internalQAPRList = this.getStagingDeployCashInternalQA(issue); @@ -254,7 +253,7 @@ class GithubUtils { * @private * * @param {Object} issue - * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean, isAccessible: Boolean}] + * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashInternalQA(issue) { let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:- \[[ x]].*\r?\n)+)/) || []; @@ -268,7 +267,6 @@ class GithubUtils { url: match[2], number: Number.parseInt(match[3], 10), isResolved: match[1] === 'x', - isAccessible: false, }), ); return _.sortBy(internalQAPRs, 'number'); @@ -280,7 +278,6 @@ 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} [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. * @param {Boolean} [isTimingDashboardChecked] @@ -291,7 +288,6 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], isTimingDashboardChecked = false, @@ -322,7 +318,6 @@ class GithubUtils { ); 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) @@ -343,9 +338,8 @@ class GithubUtils { if (!_.isEmpty(sortedPRList)) { issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += `\r\n\r\n- ${URL}`; - issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; - issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; + issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x]' : '\r\n - [ ]'; + issueBody += ` ${URL}`; }); } @@ -12100,7 +12094,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12113,7 +12107,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12122,14 +12116,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup From b728c957d5202593fa6d3725ffbf1f96b1e829c8 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 8 Jul 2022 12:27:24 -0600 Subject: [PATCH 06/41] Remove accessibility logic since we are no longer using the checkboxes --- .../isPullRequestMergeable/index.js | 28 ++++++++----------- .../javascript/isStagingDeployLocked/index.js | 28 ++++++++----------- .../reopenIssueWithComment/index.js | 28 ++++++++----------- .../triggerWorkflowAndWait/index.js | 28 ++++++++----------- .../markPullRequestsAsDeployed/index.js | 28 ++++++++----------- .github/libs/GithubUtils.js | 18 ++++-------- 6 files changed, 61 insertions(+), 97 deletions(-) diff --git a/.github/actions/javascript/isPullRequestMergeable/index.js b/.github/actions/javascript/isPullRequestMergeable/index.js index 6f240ac67571..0a1b23b604bc 100644 --- a/.github/actions/javascript/isPullRequestMergeable/index.js +++ b/.github/actions/javascript/isPullRequestMergeable/index.js @@ -235,7 +235,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*(?:\r?\n)*((?:.*\r?\n(?:\s+-\s.*\r?\n)+\r?\n)+)/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -243,12 +243,11 @@ class GithubUtils { } PRListSection = PRListSection[1]; const PRList = _.map( - [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[([ x])] QA\\s+- \\[([ x])] Accessibility`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ url: match[1], number: Number.parseInt(match[2], 10), - isVerified: match[3] === 'x', - isAccessible: match[4] === 'x', + isVerified: match[0] === 'x', }), ); const internalQAPRList = this.getStagingDeployCashInternalQA(issue); @@ -286,7 +285,7 @@ class GithubUtils { * @private * * @param {Object} issue - * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean, isAccessible: Boolean}] + * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashInternalQA(issue) { let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:- \[[ x]].*\r?\n)+)/) || []; @@ -300,7 +299,6 @@ class GithubUtils { url: match[2], number: Number.parseInt(match[3], 10), isResolved: match[1] === 'x', - isAccessible: false, }), ); return _.sortBy(internalQAPRs, 'number'); @@ -312,7 +310,6 @@ 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} [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. * @param {Boolean} [isTimingDashboardChecked] @@ -323,7 +320,6 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], isTimingDashboardChecked = false, @@ -354,7 +350,6 @@ class GithubUtils { ); 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) @@ -375,9 +370,8 @@ class GithubUtils { if (!_.isEmpty(sortedPRList)) { issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += `\r\n\r\n- ${URL}`; - issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; - issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; + issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x]' : '\r\n - [ ]'; + issueBody += ` ${URL}`; }); } @@ -12181,7 +12175,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12194,7 +12188,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12203,14 +12197,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup diff --git a/.github/actions/javascript/isStagingDeployLocked/index.js b/.github/actions/javascript/isStagingDeployLocked/index.js index 4e6a8ba62535..a3937aa48817 100644 --- a/.github/actions/javascript/isStagingDeployLocked/index.js +++ b/.github/actions/javascript/isStagingDeployLocked/index.js @@ -167,7 +167,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*(?:\r?\n)*((?:.*\r?\n(?:\s+-\s.*\r?\n)+\r?\n)+)/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -175,12 +175,11 @@ class GithubUtils { } PRListSection = PRListSection[1]; const PRList = _.map( - [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[([ x])] QA\\s+- \\[([ x])] Accessibility`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ url: match[1], number: Number.parseInt(match[2], 10), - isVerified: match[3] === 'x', - isAccessible: match[4] === 'x', + isVerified: match[0] === 'x', }), ); const internalQAPRList = this.getStagingDeployCashInternalQA(issue); @@ -218,7 +217,7 @@ class GithubUtils { * @private * * @param {Object} issue - * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean, isAccessible: Boolean}] + * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashInternalQA(issue) { let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:- \[[ x]].*\r?\n)+)/) || []; @@ -232,7 +231,6 @@ class GithubUtils { url: match[2], number: Number.parseInt(match[3], 10), isResolved: match[1] === 'x', - isAccessible: false, }), ); return _.sortBy(internalQAPRs, 'number'); @@ -244,7 +242,6 @@ 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} [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. * @param {Boolean} [isTimingDashboardChecked] @@ -255,7 +252,6 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], isTimingDashboardChecked = false, @@ -286,7 +282,6 @@ class GithubUtils { ); 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) @@ -307,9 +302,8 @@ class GithubUtils { if (!_.isEmpty(sortedPRList)) { issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += `\r\n\r\n- ${URL}`; - issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; - issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; + issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x]' : '\r\n - [ ]'; + issueBody += ` ${URL}`; }); } @@ -12064,7 +12058,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12077,7 +12071,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12086,14 +12080,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup diff --git a/.github/actions/javascript/reopenIssueWithComment/index.js b/.github/actions/javascript/reopenIssueWithComment/index.js index 98793c8e1e65..44576e02c009 100644 --- a/.github/actions/javascript/reopenIssueWithComment/index.js +++ b/.github/actions/javascript/reopenIssueWithComment/index.js @@ -178,7 +178,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*(?:\r?\n)*((?:.*\r?\n(?:\s+-\s.*\r?\n)+\r?\n)+)/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -186,12 +186,11 @@ class GithubUtils { } PRListSection = PRListSection[1]; const PRList = _.map( - [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[([ x])] QA\\s+- \\[([ x])] Accessibility`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ url: match[1], number: Number.parseInt(match[2], 10), - isVerified: match[3] === 'x', - isAccessible: match[4] === 'x', + isVerified: match[0] === 'x', }), ); const internalQAPRList = this.getStagingDeployCashInternalQA(issue); @@ -229,7 +228,7 @@ class GithubUtils { * @private * * @param {Object} issue - * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean, isAccessible: Boolean}] + * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashInternalQA(issue) { let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:- \[[ x]].*\r?\n)+)/) || []; @@ -243,7 +242,6 @@ class GithubUtils { url: match[2], number: Number.parseInt(match[3], 10), isResolved: match[1] === 'x', - isAccessible: false, }), ); return _.sortBy(internalQAPRs, 'number'); @@ -255,7 +253,6 @@ 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} [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. * @param {Boolean} [isTimingDashboardChecked] @@ -266,7 +263,6 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], isTimingDashboardChecked = false, @@ -297,7 +293,6 @@ class GithubUtils { ); 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) @@ -318,9 +313,8 @@ class GithubUtils { if (!_.isEmpty(sortedPRList)) { issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += `\r\n\r\n- ${URL}`; - issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; - issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; + issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x]' : '\r\n - [ ]'; + issueBody += ` ${URL}`; }); } @@ -12075,7 +12069,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12088,7 +12082,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12097,14 +12091,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup diff --git a/.github/actions/javascript/triggerWorkflowAndWait/index.js b/.github/actions/javascript/triggerWorkflowAndWait/index.js index d0b91a87baa9..e25bec4b9424 100644 --- a/.github/actions/javascript/triggerWorkflowAndWait/index.js +++ b/.github/actions/javascript/triggerWorkflowAndWait/index.js @@ -347,7 +347,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*(?:\r?\n)*((?:.*\r?\n(?:\s+-\s.*\r?\n)+\r?\n)+)/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -355,12 +355,11 @@ class GithubUtils { } PRListSection = PRListSection[1]; const PRList = _.map( - [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[([ x])] QA\\s+- \\[([ x])] Accessibility`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ url: match[1], number: Number.parseInt(match[2], 10), - isVerified: match[3] === 'x', - isAccessible: match[4] === 'x', + isVerified: match[0] === 'x', }), ); const internalQAPRList = this.getStagingDeployCashInternalQA(issue); @@ -398,7 +397,7 @@ class GithubUtils { * @private * * @param {Object} issue - * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean, isAccessible: Boolean}] + * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashInternalQA(issue) { let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:- \[[ x]].*\r?\n)+)/) || []; @@ -412,7 +411,6 @@ class GithubUtils { url: match[2], number: Number.parseInt(match[3], 10), isResolved: match[1] === 'x', - isAccessible: false, }), ); return _.sortBy(internalQAPRs, 'number'); @@ -424,7 +422,6 @@ 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} [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. * @param {Boolean} [isTimingDashboardChecked] @@ -435,7 +432,6 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], isTimingDashboardChecked = false, @@ -466,7 +462,6 @@ class GithubUtils { ); 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) @@ -487,9 +482,8 @@ class GithubUtils { if (!_.isEmpty(sortedPRList)) { issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += `\r\n\r\n- ${URL}`; - issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; - issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; + issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x]' : '\r\n - [ ]'; + issueBody += ` ${URL}`; }); } @@ -12293,7 +12287,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12306,7 +12300,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12315,14 +12309,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup diff --git a/.github/actions/markPullRequestsAsDeployed/index.js b/.github/actions/markPullRequestsAsDeployed/index.js index 3ff1d08baa33..53509187f4d5 100644 --- a/.github/actions/markPullRequestsAsDeployed/index.js +++ b/.github/actions/markPullRequestsAsDeployed/index.js @@ -336,7 +336,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*(?:\r?\n)*((?:.*\r?\n(?:\s+-\s.*\r?\n)+\r?\n)+)/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -344,12 +344,11 @@ class GithubUtils { } PRListSection = PRListSection[1]; const PRList = _.map( - [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[([ x])] QA\\s+- \\[([ x])] Accessibility`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ url: match[1], number: Number.parseInt(match[2], 10), - isVerified: match[3] === 'x', - isAccessible: match[4] === 'x', + isVerified: match[0] === 'x', }), ); const internalQAPRList = this.getStagingDeployCashInternalQA(issue); @@ -387,7 +386,7 @@ class GithubUtils { * @private * * @param {Object} issue - * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean, isAccessible: Boolean}] + * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashInternalQA(issue) { let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:- \[[ x]].*\r?\n)+)/) || []; @@ -401,7 +400,6 @@ class GithubUtils { url: match[2], number: Number.parseInt(match[3], 10), isResolved: match[1] === 'x', - isAccessible: false, }), ); return _.sortBy(internalQAPRs, 'number'); @@ -413,7 +411,6 @@ 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} [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. * @param {Boolean} [isTimingDashboardChecked] @@ -424,7 +421,6 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], isTimingDashboardChecked = false, @@ -455,7 +451,6 @@ class GithubUtils { ); 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) @@ -476,9 +471,8 @@ class GithubUtils { if (!_.isEmpty(sortedPRList)) { issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += `\r\n\r\n- ${URL}`; - issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; - issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; + issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x]' : '\r\n - [ ]'; + issueBody += ` ${URL}`; }); } @@ -12276,7 +12270,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12289,7 +12283,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12298,14 +12292,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index b1b77249baf6..4124c5196723 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -127,7 +127,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*(?:\r?\n)*((?:.*\r?\n(?:\s+-\s.*\r?\n)+\r?\n)+)/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -135,12 +135,11 @@ class GithubUtils { } PRListSection = PRListSection[1]; const PRList = _.map( - [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[([ x])] QA\\s+- \\[([ x])] Accessibility`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ url: match[1], number: Number.parseInt(match[2], 10), - isVerified: match[3] === 'x', - isAccessible: match[4] === 'x', + isVerified: match[0] === 'x', }), ); const internalQAPRList = this.getStagingDeployCashInternalQA(issue); @@ -178,7 +177,7 @@ class GithubUtils { * @private * * @param {Object} issue - * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean, isAccessible: Boolean}] + * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashInternalQA(issue) { let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:- \[[ x]].*\r?\n)+)/) || []; @@ -192,7 +191,6 @@ class GithubUtils { url: match[2], number: Number.parseInt(match[3], 10), isResolved: match[1] === 'x', - isAccessible: false, }), ); return _.sortBy(internalQAPRs, 'number'); @@ -204,7 +202,6 @@ 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} [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. * @param {Boolean} [isTimingDashboardChecked] @@ -215,7 +212,6 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], isTimingDashboardChecked = false, @@ -246,7 +242,6 @@ class GithubUtils { ); 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) @@ -267,9 +262,8 @@ class GithubUtils { if (!_.isEmpty(sortedPRList)) { issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += `\r\n\r\n- ${URL}`; - issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; - issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; + issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x]' : '\r\n - [ ]'; + issueBody += ` ${URL}`; }); } From 01035e34878523f9835668bb1c73c300fecc0ec3 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 8 Jul 2022 12:36:16 -0600 Subject: [PATCH 07/41] Update to correct indecies --- .github/actions/getReleaseBody/index.js | 6 +++--- .../actions/javascript/createOrUpdateStagingDeploy/index.js | 6 +++--- .github/actions/javascript/getPullRequestDetails/index.js | 6 +++--- .github/actions/javascript/isPullRequestMergeable/index.js | 6 +++--- .github/actions/javascript/isStagingDeployLocked/index.js | 6 +++--- .github/actions/javascript/reopenIssueWithComment/index.js | 6 +++--- .github/actions/javascript/triggerWorkflowAndWait/index.js | 6 +++--- .github/actions/markPullRequestsAsDeployed/index.js | 6 +++--- .github/libs/GithubUtils.js | 6 +++--- 9 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/actions/getReleaseBody/index.js b/.github/actions/getReleaseBody/index.js index 5f1d6f404330..d71643fd2862 100644 --- a/.github/actions/getReleaseBody/index.js +++ b/.github/actions/getReleaseBody/index.js @@ -213,9 +213,9 @@ class GithubUtils { const PRList = _.map( [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ - url: match[1], - number: Number.parseInt(match[2], 10), - isVerified: match[0] === 'x', + url: match[2], + number: Number.parseInt(match[3], 10), + isVerified: match[1] === 'x', }), ); const internalQAPRList = this.getStagingDeployCashInternalQA(issue); diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index 193636ff34b3..08fe64a3015c 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -415,9 +415,9 @@ class GithubUtils { const PRList = _.map( [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ - url: match[1], - number: Number.parseInt(match[2], 10), - isVerified: match[0] === 'x', + url: match[2], + number: Number.parseInt(match[3], 10), + isVerified: match[1] === 'x', }), ); const internalQAPRList = this.getStagingDeployCashInternalQA(issue); diff --git a/.github/actions/javascript/getPullRequestDetails/index.js b/.github/actions/javascript/getPullRequestDetails/index.js index 10f18cf40e48..132bffb2f2b7 100644 --- a/.github/actions/javascript/getPullRequestDetails/index.js +++ b/.github/actions/javascript/getPullRequestDetails/index.js @@ -295,9 +295,9 @@ class GithubUtils { const PRList = _.map( [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ - url: match[1], - number: Number.parseInt(match[2], 10), - isVerified: match[0] === 'x', + url: match[2], + number: Number.parseInt(match[3], 10), + isVerified: match[1] === 'x', }), ); const internalQAPRList = this.getStagingDeployCashInternalQA(issue); diff --git a/.github/actions/javascript/isPullRequestMergeable/index.js b/.github/actions/javascript/isPullRequestMergeable/index.js index 0a1b23b604bc..94dc07375aa9 100644 --- a/.github/actions/javascript/isPullRequestMergeable/index.js +++ b/.github/actions/javascript/isPullRequestMergeable/index.js @@ -245,9 +245,9 @@ class GithubUtils { const PRList = _.map( [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ - url: match[1], - number: Number.parseInt(match[2], 10), - isVerified: match[0] === 'x', + url: match[2], + number: Number.parseInt(match[3], 10), + isVerified: match[1] === 'x', }), ); const internalQAPRList = this.getStagingDeployCashInternalQA(issue); diff --git a/.github/actions/javascript/isStagingDeployLocked/index.js b/.github/actions/javascript/isStagingDeployLocked/index.js index a3937aa48817..7da7ec974c0f 100644 --- a/.github/actions/javascript/isStagingDeployLocked/index.js +++ b/.github/actions/javascript/isStagingDeployLocked/index.js @@ -177,9 +177,9 @@ class GithubUtils { const PRList = _.map( [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ - url: match[1], - number: Number.parseInt(match[2], 10), - isVerified: match[0] === 'x', + url: match[2], + number: Number.parseInt(match[3], 10), + isVerified: match[1] === 'x', }), ); const internalQAPRList = this.getStagingDeployCashInternalQA(issue); diff --git a/.github/actions/javascript/reopenIssueWithComment/index.js b/.github/actions/javascript/reopenIssueWithComment/index.js index 44576e02c009..43bb4e9aa86e 100644 --- a/.github/actions/javascript/reopenIssueWithComment/index.js +++ b/.github/actions/javascript/reopenIssueWithComment/index.js @@ -188,9 +188,9 @@ class GithubUtils { const PRList = _.map( [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ - url: match[1], - number: Number.parseInt(match[2], 10), - isVerified: match[0] === 'x', + url: match[2], + number: Number.parseInt(match[3], 10), + isVerified: match[1] === 'x', }), ); const internalQAPRList = this.getStagingDeployCashInternalQA(issue); diff --git a/.github/actions/javascript/triggerWorkflowAndWait/index.js b/.github/actions/javascript/triggerWorkflowAndWait/index.js index e25bec4b9424..f35ce96297da 100644 --- a/.github/actions/javascript/triggerWorkflowAndWait/index.js +++ b/.github/actions/javascript/triggerWorkflowAndWait/index.js @@ -357,9 +357,9 @@ class GithubUtils { const PRList = _.map( [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ - url: match[1], - number: Number.parseInt(match[2], 10), - isVerified: match[0] === 'x', + url: match[2], + number: Number.parseInt(match[3], 10), + isVerified: match[1] === 'x', }), ); const internalQAPRList = this.getStagingDeployCashInternalQA(issue); diff --git a/.github/actions/markPullRequestsAsDeployed/index.js b/.github/actions/markPullRequestsAsDeployed/index.js index 53509187f4d5..33f2d55208c7 100644 --- a/.github/actions/markPullRequestsAsDeployed/index.js +++ b/.github/actions/markPullRequestsAsDeployed/index.js @@ -346,9 +346,9 @@ class GithubUtils { const PRList = _.map( [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ - url: match[1], - number: Number.parseInt(match[2], 10), - isVerified: match[0] === 'x', + url: match[2], + number: Number.parseInt(match[3], 10), + isVerified: match[1] === 'x', }), ); const internalQAPRList = this.getStagingDeployCashInternalQA(issue); diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index 4124c5196723..d5c0e7c81358 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -137,9 +137,9 @@ class GithubUtils { const PRList = _.map( [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ - url: match[1], - number: Number.parseInt(match[2], 10), - isVerified: match[0] === 'x', + url: match[2], + number: Number.parseInt(match[3], 10), + isVerified: match[1] === 'x', }), ); const internalQAPRList = this.getStagingDeployCashInternalQA(issue); From 89959ce7e330d58abab0c17d8df8f4bbf23bebdc Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 8 Jul 2022 13:17:20 -0600 Subject: [PATCH 08/41] Change format back to having no accessibility --- tests/unit/GithubUtilsTest.js | 72 +++++++++++++++++------------------ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index a5c8e8a2687f..c7733ea39b96 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -25,7 +25,7 @@ describe('GithubUtils', () => { }, ], // eslint-disable-next-line max-len - body: '**Release Version:** `1.0.1-47`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n\r\n**This release contains changes from the following pull requests:**\r\n- https://github.com/Expensify/App/pull/21\r\n - [ ] QA\r\n - [ ] Accessibility\r\n\r\n- https://github.com/Expensify/App/pull/22\r\n - [x] QA\r\n - [ ] Accessibility\r\n\r\n- https://github.com/Expensify/App/pull/23\r\n - [ ] QA\r\n - [ ] Accessibility\r\n\r\n', + body: '**Release Version:** `1.0.1-47`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n\r\n**This release contains changes from the following pull requests:**\r\n- [ ] https://github.com/Expensify/App/pull/21\r\n- [x] https://github.com/Expensify/App/pull/22\r\n- [ ]https://github.com/Expensify/App/pull/23', }; const issueWithDeployBlockers = {...baseIssue}; // eslint-disable-next-line max-len @@ -385,22 +385,22 @@ describe('GithubUtils', () => { // Valid output which will be reused in the deploy blocker tests 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[5]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` - + `${lineBreakDouble}${listStart}${basePRList[6]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}`; + + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[2]}` + + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[0]}` + + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[1]}` + + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[5]}` + + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[6]}`; test('Test no verified PRs', () => ( githubUtils.generateStagingDeployCashBody(tag, basePRList) .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` - + `${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}${listStart}${openCheckbox}${basePRList[2]}` + + `${lineBreakDouble}${listStart}${openCheckbox}${basePRList[0]}` + + `${lineBreakDouble}${listStart}${openCheckbox}${basePRList[1]}` + + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[5]}` + + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[6]}` + `${lineBreak}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + `${lineBreak}${openCheckbox}${firebaseVerification}` @@ -414,11 +414,11 @@ describe('GithubUtils', () => { .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` - + `${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}${listStart}${openCheckbox}${basePRList[2]}` + + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[0]}` + + `${lineBreakDouble}${listStart}${openCheckbox}${basePRList[1]}` + + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[5]}` + + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[6]}` + `${lineBreak}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + `${lineBreak}${openCheckbox}${firebaseVerification}` @@ -432,11 +432,11 @@ describe('GithubUtils', () => { .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` - + `${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}${listStart}${openCheckbox}${basePRList[2]}` + + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[0]}` + + `${lineBreakDouble}${listStart}${openCheckbox}${basePRList[1]}` + + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[5]}` + + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[6]}` + `${lineBreak}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + `${lineBreak}${openCheckbox}${firebaseVerification}` @@ -495,11 +495,11 @@ describe('GithubUtils', () => { .then((issueBody) => { expect(issueBody).toBe( `${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}${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}${listStart}${closedCheckbox}${basePRList[2]}` + + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[0]}` + + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[1]}` + + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[5]}` + + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[6]}` + `${lineBreakDouble}${deployBlockerHeader}` + `${lineBreak}${closedCheckbox}${baseDeployBlockerList[0]}` + `${lineBreak}${closedCheckbox}${baseDeployBlockerList[1]}` @@ -516,11 +516,11 @@ describe('GithubUtils', () => { .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` - + `${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}${listStart}${openCheckbox}${basePRList[2]}` + + `${lineBreakDouble}${listStart}${openCheckbox}${basePRList[0]}` + + `${lineBreakDouble}${listStart}${openCheckbox}${basePRList[1]}` + + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[5]}` + + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[6]}` + `${lineBreakDouble}${internalQAHeader}` + `${lineBreak}${openCheckbox}${internalQAPRList[0]}${assignOctocatHubot}` + `${lineBreak}${openCheckbox}${internalQAPRList[1]}${assignOctocatHubot}` @@ -537,11 +537,11 @@ describe('GithubUtils', () => { .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` - + `${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}${listStart}${openCheckbox}${basePRList[2]}` + + `${lineBreakDouble}${listStart}${openCheckbox}${basePRList[0]}` + + `${lineBreakDouble}${listStart}${openCheckbox}${basePRList[1]}` + + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[5]}` + + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[6]}` + `${lineBreakDouble}${internalQAHeader}` + `${lineBreak}${closedCheckbox}${internalQAPRList[0]}${assignOctocatHubot}` + `${lineBreak}${openCheckbox}${internalQAPRList[1]}${assignOctocatHubot}` From 7ab5b057c0d35c53ea03cea66aefc1cd3625b261 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 8 Jul 2022 13:17:48 -0600 Subject: [PATCH 09/41] Remove some unused vars --- tests/unit/GithubUtilsTest.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index c7733ea39b96..631466b442e6 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -37,19 +37,16 @@ describe('GithubUtils', () => { url: 'https://github.com/Expensify/App/pull/21', number: 21, isVerified: false, - isAccessible: false, }, { url: 'https://github.com/Expensify/App/pull/22', number: 22, isVerified: true, - isAccessible: false, }, { url: 'https://github.com/Expensify/App/pull/23', number: 23, isVerified: false, - isAccessible: false, }, ], labels: [ @@ -368,14 +365,11 @@ describe('GithubUtils', () => { const openCheckbox = '- [ ] '; const closedCheckbox = '- [x] '; const listStart = '- '; - const QA = 'QA'; - const accessibility = 'Accessibility'; const ccApplauseLeads = 'cc @Expensify/applauseleads\r\n'; const deployBlockerHeader = '\r\n**Deploy Blockers:**'; const internalQAHeader = '\r\n**Internal QA:**'; const lineBreak = '\r\n'; const lineBreakDouble = '\r\n\r\n'; - const indent = ' '; const assignOctocatHubot = ' - @octocat @hubot'; const deployerVerificationsHeader = '\r\n**Deployer verifications:**'; // eslint-disable-next-line max-len From 6c9d953078fd531b33c20aac270abdf14b556d0f Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 8 Jul 2022 13:18:01 -0600 Subject: [PATCH 10/41] Remove accessibility test --- tests/unit/GithubUtilsTest.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index 631466b442e6..c493e4257b5b 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -421,24 +421,6 @@ describe('GithubUtils', () => { }) )); - test('Test some accessibility verified PRs', () => ( - githubUtils.generateStagingDeployCashBody(tag, basePRList, [basePRList[0]], [basePRList[1]]) - .then((issueBody) => { - expect(issueBody).toBe( - `${baseExpectedOutput}` - + `${lineBreakDouble}${listStart}${openCheckbox}${basePRList[2]}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[0]}` - + `${lineBreakDouble}${listStart}${openCheckbox}${basePRList[1]}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[5]}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[6]}` - + `${lineBreak}${deployerVerificationsHeader}` - + `${lineBreak}${openCheckbox}${timingDashboardVerification}` - + `${lineBreak}${openCheckbox}${firebaseVerification}` - + `${lineBreakDouble}${ccApplauseLeads}`, - ); - }) - )); - test('Test all verified PRs', () => ( githubUtils.generateStagingDeployCashBody(tag, basePRList, basePRList) .then((issueBody) => { From ad12d934f68f7e8507e17db5629f7757c8ec4d2b Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 8 Jul 2022 13:26:32 -0600 Subject: [PATCH 11/41] Remove bad spaces --- .github/libs/GithubUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index d5c0e7c81358..c26c2d9a3556 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -262,7 +262,7 @@ class GithubUtils { if (!_.isEmpty(sortedPRList)) { issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x]' : '\r\n - [ ]'; + issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n- [x]' : '\r\n- [ ]'; issueBody += ` ${URL}`; }); } From 5b7c8ba6fae7e31731d3e390fbbb144ffb13b348 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 8 Jul 2022 13:34:25 -0600 Subject: [PATCH 12/41] Remove unnecessary lineStart --- tests/unit/GithubUtilsTest.js | 60 +++++++++++++++++------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index c493e4257b5b..ae2759f06513 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -379,22 +379,22 @@ describe('GithubUtils', () => { // Valid output which will be reused in the deploy blocker tests const allVerifiedExpectedOutput = `${baseExpectedOutput}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[2]}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[0]}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[1]}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[5]}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[6]}`; + + `${lineBreakDouble}${closedCheckbox}${basePRList[2]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[0]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[1]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}`; test('Test no verified PRs', () => ( githubUtils.generateStagingDeployCashBody(tag, basePRList) .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` - + `${lineBreakDouble}${listStart}${openCheckbox}${basePRList[2]}` - + `${lineBreakDouble}${listStart}${openCheckbox}${basePRList[0]}` - + `${lineBreakDouble}${listStart}${openCheckbox}${basePRList[1]}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[5]}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[6]}` + + `${lineBreakDouble}${openCheckbox}${basePRList[2]}` + + `${lineBreakDouble}${openCheckbox}${basePRList[0]}` + + `${lineBreakDouble}${openCheckbox}${basePRList[1]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}` + `${lineBreak}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + `${lineBreak}${openCheckbox}${firebaseVerification}` @@ -408,11 +408,11 @@ describe('GithubUtils', () => { .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` - + `${lineBreakDouble}${listStart}${openCheckbox}${basePRList[2]}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[0]}` - + `${lineBreakDouble}${listStart}${openCheckbox}${basePRList[1]}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[5]}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[6]}` + + `${lineBreakDouble}${openCheckbox}${basePRList[2]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[0]}` + + `${lineBreakDouble}${openCheckbox}${basePRList[1]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}` + `${lineBreak}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + `${lineBreak}${openCheckbox}${firebaseVerification}` @@ -471,11 +471,11 @@ describe('GithubUtils', () => { .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[2]}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[0]}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[1]}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[5]}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[6]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[2]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[0]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[1]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}` + `${lineBreakDouble}${deployBlockerHeader}` + `${lineBreak}${closedCheckbox}${baseDeployBlockerList[0]}` + `${lineBreak}${closedCheckbox}${baseDeployBlockerList[1]}` @@ -492,11 +492,11 @@ describe('GithubUtils', () => { .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` - + `${lineBreakDouble}${listStart}${openCheckbox}${basePRList[2]}` - + `${lineBreakDouble}${listStart}${openCheckbox}${basePRList[0]}` - + `${lineBreakDouble}${listStart}${openCheckbox}${basePRList[1]}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[5]}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[6]}` + + `${lineBreakDouble}${openCheckbox}${basePRList[2]}` + + `${lineBreakDouble}${openCheckbox}${basePRList[0]}` + + `${lineBreakDouble}${openCheckbox}${basePRList[1]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}` + `${lineBreakDouble}${internalQAHeader}` + `${lineBreak}${openCheckbox}${internalQAPRList[0]}${assignOctocatHubot}` + `${lineBreak}${openCheckbox}${internalQAPRList[1]}${assignOctocatHubot}` @@ -513,11 +513,11 @@ describe('GithubUtils', () => { .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` - + `${lineBreakDouble}${listStart}${openCheckbox}${basePRList[2]}` - + `${lineBreakDouble}${listStart}${openCheckbox}${basePRList[0]}` - + `${lineBreakDouble}${listStart}${openCheckbox}${basePRList[1]}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[5]}` - + `${lineBreakDouble}${listStart}${closedCheckbox}${basePRList[6]}` + + `${lineBreakDouble}${openCheckbox}${basePRList[2]}` + + `${lineBreakDouble}${openCheckbox}${basePRList[0]}` + + `${lineBreakDouble}${openCheckbox}${basePRList[1]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}` + `${lineBreakDouble}${internalQAHeader}` + `${lineBreak}${closedCheckbox}${internalQAPRList[0]}${assignOctocatHubot}` + `${lineBreak}${openCheckbox}${internalQAPRList[1]}${assignOctocatHubot}` From 4493fc1f6939b21f5075aee8204e4a80930fcd6d Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 8 Jul 2022 13:47:32 -0600 Subject: [PATCH 13/41] Double line break --- tests/unit/GithubUtilsTest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index ae2759f06513..c9fd849a0b9e 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -25,7 +25,7 @@ describe('GithubUtils', () => { }, ], // eslint-disable-next-line max-len - body: '**Release Version:** `1.0.1-47`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n\r\n**This release contains changes from the following pull requests:**\r\n- [ ] https://github.com/Expensify/App/pull/21\r\n- [x] https://github.com/Expensify/App/pull/22\r\n- [ ]https://github.com/Expensify/App/pull/23', + body: '**Release Version:** `1.0.1-47`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n\r\n**This release contains changes from the following pull requests:**\r\n\r\n- [ ] https://github.com/Expensify/App/pull/21\r\n- [x] https://github.com/Expensify/App/pull/22\r\n- [ ]https://github.com/Expensify/App/pull/23', }; const issueWithDeployBlockers = {...baseIssue}; // eslint-disable-next-line max-len From d8dd3573f44971112aa8af2f54bc74ea8af42724 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 8 Jul 2022 13:50:55 -0600 Subject: [PATCH 14/41] Change from double line break to single --- tests/unit/GithubUtilsTest.js | 66 +++++++++++++++++------------------ 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index c9fd849a0b9e..322e5291dc21 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -379,22 +379,22 @@ describe('GithubUtils', () => { // Valid output which will be reused in the deploy blocker tests const allVerifiedExpectedOutput = `${baseExpectedOutput}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[2]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[0]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[1]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}`; + + `${lineBreak}${closedCheckbox}${basePRList[2]}` + + `${lineBreak}${closedCheckbox}${basePRList[0]}` + + `${lineBreak}${closedCheckbox}${basePRList[1]}` + + `${lineBreak}${closedCheckbox}${basePRList[5]}` + + `${lineBreak}${closedCheckbox}${basePRList[6]}`; test('Test no verified PRs', () => ( githubUtils.generateStagingDeployCashBody(tag, basePRList) .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` - + `${lineBreakDouble}${openCheckbox}${basePRList[2]}` - + `${lineBreakDouble}${openCheckbox}${basePRList[0]}` - + `${lineBreakDouble}${openCheckbox}${basePRList[1]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}` + + `${lineBreak}${openCheckbox}${basePRList[2]}` + + `${lineBreak}${openCheckbox}${basePRList[0]}` + + `${lineBreak}${openCheckbox}${basePRList[1]}` + + `${lineBreak}${closedCheckbox}${basePRList[5]}` + + `${lineBreak}${closedCheckbox}${basePRList[6]}` + `${lineBreak}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + `${lineBreak}${openCheckbox}${firebaseVerification}` @@ -408,11 +408,11 @@ describe('GithubUtils', () => { .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` - + `${lineBreakDouble}${openCheckbox}${basePRList[2]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[0]}` - + `${lineBreakDouble}${openCheckbox}${basePRList[1]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}` + + `${lineBreak}${openCheckbox}${basePRList[2]}` + + `${lineBreak}${closedCheckbox}${basePRList[0]}` + + `${lineBreak}${openCheckbox}${basePRList[1]}` + + `${lineBreak}${closedCheckbox}${basePRList[5]}` + + `${lineBreak}${closedCheckbox}${basePRList[6]}` + `${lineBreak}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + `${lineBreak}${openCheckbox}${firebaseVerification}` @@ -471,12 +471,12 @@ describe('GithubUtils', () => { .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[2]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[0]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[1]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}` - + `${lineBreakDouble}${deployBlockerHeader}` + + `${lineBreak}${closedCheckbox}${basePRList[2]}` + + `${lineBreak}${closedCheckbox}${basePRList[0]}` + + `${lineBreak}${closedCheckbox}${basePRList[1]}` + + `${lineBreak}${closedCheckbox}${basePRList[5]}` + + `${lineBreak}${closedCheckbox}${basePRList[6]}` + + `${lineBreak}${deployBlockerHeader}` + `${lineBreak}${closedCheckbox}${baseDeployBlockerList[0]}` + `${lineBreak}${closedCheckbox}${baseDeployBlockerList[1]}` + `${lineBreak}${deployerVerificationsHeader}` @@ -492,12 +492,12 @@ describe('GithubUtils', () => { .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` - + `${lineBreakDouble}${openCheckbox}${basePRList[2]}` - + `${lineBreakDouble}${openCheckbox}${basePRList[0]}` - + `${lineBreakDouble}${openCheckbox}${basePRList[1]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}` - + `${lineBreakDouble}${internalQAHeader}` + + `${lineBreak}${openCheckbox}${basePRList[2]}` + + `${lineBreak}${openCheckbox}${basePRList[0]}` + + `${lineBreak}${openCheckbox}${basePRList[1]}` + + `${lineBreak}${closedCheckbox}${basePRList[5]}` + + `${lineBreak}${closedCheckbox}${basePRList[6]}` + + `${lineBreak}${internalQAHeader}` + `${lineBreak}${openCheckbox}${internalQAPRList[0]}${assignOctocatHubot}` + `${lineBreak}${openCheckbox}${internalQAPRList[1]}${assignOctocatHubot}` + `${lineBreak}${deployerVerificationsHeader}` @@ -513,12 +513,12 @@ describe('GithubUtils', () => { .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` - + `${lineBreakDouble}${openCheckbox}${basePRList[2]}` - + `${lineBreakDouble}${openCheckbox}${basePRList[0]}` - + `${lineBreakDouble}${openCheckbox}${basePRList[1]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}` - + `${lineBreakDouble}${internalQAHeader}` + + `${lineBreak}${openCheckbox}${basePRList[2]}` + + `${lineBreak}${openCheckbox}${basePRList[0]}` + + `${lineBreak}${openCheckbox}${basePRList[1]}` + + `${lineBreak}${closedCheckbox}${basePRList[5]}` + + `${lineBreak}${closedCheckbox}${basePRList[6]}` + + `${lineBreak}${internalQAHeader}` + `${lineBreak}${closedCheckbox}${internalQAPRList[0]}${assignOctocatHubot}` + `${lineBreak}${openCheckbox}${internalQAPRList[1]}${assignOctocatHubot}` + `${lineBreak}${deployerVerificationsHeader}` From 6a7c4bb622a0a86df4a7733be44289a465725477 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 8 Jul 2022 14:05:17 -0600 Subject: [PATCH 15/41] Remove accessibility checkboxes --- tests/unit/createOrUpdateStagingDeployTest.js | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/tests/unit/createOrUpdateStagingDeployTest.js b/tests/unit/createOrUpdateStagingDeployTest.js index bd4c063d1496..1dd9d9d8aa28 100644 --- a/tests/unit/createOrUpdateStagingDeployTest.js +++ b/tests/unit/createOrUpdateStagingDeployTest.js @@ -122,13 +122,13 @@ describe('createOrUpdateStagingDeployCash', () => { html_url: 'https://github.com/Expensify/App/issues/29', // eslint-disable-next-line max-len body: `${baseExpectedOutput('1.0.1-0')}` - + `${lineBreakDouble}${listStart}${basePRList[0]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` - + `${lineBreakDouble}${listStart}${basePRList[1]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` - + `${lineBreakDouble}${listStart}${basePRList[2]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` + + `${lineBreak}${closedCheckbox}${basePRList[0]}` + + `${lineBreak}${closedCheckbox}${basePRList[1]}` + + `${lineBreak}${closedCheckbox}${basePRList[2]}` + `${lineBreakDouble}${deployBlockerHeader}` - + `${lineBreakDouble}${listStart}${basePRList[0]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` - + `${lineBreakDouble}${listStart}${basePRList[3]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` - + `${lineBreakDouble}${listStart}${basePRList[4]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` + + `${lineBreak}${closedCheckbox}${basePRList[0]}` + + `${lineBreak}${closedCheckbox}${basePRList[3]}` + + `${lineBreak}${closedCheckbox}${basePRList[4]}` + `${lineBreakDouble}${ccApplauseLeads}`, }; @@ -171,9 +171,9 @@ describe('createOrUpdateStagingDeployCash', () => { html_url: 'https://github.com/Expensify/App/issues/29', assignees: [GithubUtils.APPLAUSE_BOT], body: `${baseExpectedOutput()}` - + `${lineBreakDouble}${listStart}${basePRList[5]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` - + `${lineBreakDouble}${listStart}${basePRList[6]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` - + `${lineBreakDouble}${listStart}${basePRList[7]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` + + `${lineBreak}${openCheckbox}${basePRList[5]}` + + `${lineBreak}${openCheckbox}${basePRList[6]}` + + `${lineBreak}${openCheckbox}${basePRList[7]}` + `${lineBreak}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + `${lineBreak}${openCheckbox}${firebaseVerification}` @@ -190,9 +190,9 @@ describe('createOrUpdateStagingDeployCash', () => { labels: [LABELS.STAGING_DEPLOY_CASH], // eslint-disable-next-line max-len body: `${baseExpectedOutput()}` - + `${lineBreakDouble}${listStart}${basePRList[5]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` - + `${lineBreakDouble}${listStart}${basePRList[6]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` - + `${lineBreakDouble}${listStart}${basePRList[7]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` + + `${lineBreak}${openCheckbox}${basePRList[5]}` + + `${lineBreak}${closedCheckbox}${basePRList[6]}` + + `${lineBreak}${openCheckbox}${basePRList[7]}` + `${lineBreakDouble}${deployBlockerHeader}` + `${lineBreak}${openCheckbox}${basePRList[5]}` + `${lineBreak}${openCheckbox}${basePRList[8]}` @@ -285,11 +285,11 @@ describe('createOrUpdateStagingDeployCash', () => { html_url: `https://github.com/Expensify/App/issues/${openStagingDeployCashBefore.number}`, // eslint-disable-next-line max-len body: `${baseExpectedOutput('1.0.2-2')}` - + `${lineBreakDouble}${listStart}${basePRList[5]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` - + `${lineBreakDouble}${listStart}${basePRList[6]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` - + `${lineBreakDouble}${listStart}${basePRList[7]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` - + `${lineBreakDouble}${listStart}${basePRList[8]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` - + `${lineBreakDouble}${listStart}${basePRList[9]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` + + `${lineBreak}${openCheckbox}${basePRList[5]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` + + `${lineBreak}${closedCheckbox}${basePRList[6]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` + + `${lineBreak}${openCheckbox}${basePRList[7]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` + + `${lineBreak}${openCheckbox}${basePRList[8]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` + + `${lineBreak}${openCheckbox}${basePRList[9]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` + `${lineBreakDouble}${deployBlockerHeader}` + `${lineBreak}${openCheckbox}${basePRList[5]}` + `${lineBreak}${openCheckbox}${basePRList[8]}` @@ -358,9 +358,9 @@ describe('createOrUpdateStagingDeployCash', () => { html_url: `https://github.com/Expensify/App/issues/${openStagingDeployCashBefore.number}`, // eslint-disable-next-line max-len body: `${baseExpectedOutput('1.0.2-1')}` - + `${lineBreakDouble}${listStart}${basePRList[5]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` - + `${lineBreakDouble}${listStart}${basePRList[6]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` - + `${lineBreakDouble}${listStart}${basePRList[7]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` + + `${lineBreak}${openCheckbox}${basePRList[5]}` + + `${lineBreak}${closedCheckbox}${basePRList[6]}` + + `${lineBreak}${openCheckbox}${basePRList[7]}` + `${lineBreakDouble}${deployBlockerHeader}` + `${lineBreak}${openCheckbox}${basePRList[5]}` + `${lineBreak}${openCheckbox}${basePRList[8]}` From a9fd02f790a27d0ca378772c825d2fbea162ef02 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 8 Jul 2022 17:44:24 -0600 Subject: [PATCH 16/41] Fix regex --- .github/libs/GithubUtils.js | 2 +- tests/unit/GithubUtilsTest.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index c26c2d9a3556..0d12d9ddfb5c 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -127,7 +127,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*(?:\r?\n)*((?:.*\r?\n(?:-\s.*\r?\n?)+)+)/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index 322e5291dc21..4de67bbf130f 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -25,7 +25,7 @@ describe('GithubUtils', () => { }, ], // eslint-disable-next-line max-len - body: '**Release Version:** `1.0.1-47`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n\r\n**This release contains changes from the following pull requests:**\r\n\r\n- [ ] https://github.com/Expensify/App/pull/21\r\n- [x] https://github.com/Expensify/App/pull/22\r\n- [ ]https://github.com/Expensify/App/pull/23', + body: '**Release Version:** `1.0.1-47`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n\r\n**This release contains changes from the following pull requests:**\r\n\r\n- [ ] https://github.com/Expensify/App/pull/21\r\n- [x] https://github.com/Expensify/App/pull/22\r\n- [ ] https://github.com/Expensify/App/pull/23', }; const issueWithDeployBlockers = {...baseIssue}; // eslint-disable-next-line max-len From f8eaf0d8fd42e45374d70b06145d03334ab14a44 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 8 Jul 2022 18:16:42 -0600 Subject: [PATCH 17/41] Remove accessibility checkboxes --- tests/unit/createOrUpdateStagingDeployTest.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/unit/createOrUpdateStagingDeployTest.js b/tests/unit/createOrUpdateStagingDeployTest.js index 1dd9d9d8aa28..218a97eb5724 100644 --- a/tests/unit/createOrUpdateStagingDeployTest.js +++ b/tests/unit/createOrUpdateStagingDeployTest.js @@ -101,7 +101,6 @@ const openCheckbox = '- [ ] '; const closedCheckbox = '- [x] '; const listStart = '- '; const QA = 'QA'; -const accessibility = 'Accessibility'; const deployerVerificationsHeader = '\r\n**Deployer verifications:**'; // eslint-disable-next-line max-len const timingDashboardVerification = 'I checked the [App Timing Dashboard](https://graphs.expensify.com/grafana/d/yj2EobAGz/app-timing?orgId=1) and verified this release does not cause a noticeable performance regression.'; @@ -285,11 +284,11 @@ describe('createOrUpdateStagingDeployCash', () => { html_url: `https://github.com/Expensify/App/issues/${openStagingDeployCashBefore.number}`, // eslint-disable-next-line max-len body: `${baseExpectedOutput('1.0.2-2')}` - + `${lineBreak}${openCheckbox}${basePRList[5]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` - + `${lineBreak}${closedCheckbox}${basePRList[6]}${lineBreak}${indent}${closedCheckbox}${QA}${lineBreak}${indent}${closedCheckbox}${accessibility}` - + `${lineBreak}${openCheckbox}${basePRList[7]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` - + `${lineBreak}${openCheckbox}${basePRList[8]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` - + `${lineBreak}${openCheckbox}${basePRList[9]}${lineBreak}${indent}${openCheckbox}${QA}${lineBreak}${indent}${openCheckbox}${accessibility}` + + `${lineBreak}${openCheckbox}${basePRList[5]}` + + `${lineBreak}${closedCheckbox}${basePRList[6]}` + + `${lineBreak}${openCheckbox}${basePRList[7]}` + + `${lineBreak}${openCheckbox}${basePRList[8]}` + + `${lineBreak}${openCheckbox}${basePRList[9]}` + `${lineBreakDouble}${deployBlockerHeader}` + `${lineBreak}${openCheckbox}${basePRList[5]}` + `${lineBreak}${openCheckbox}${basePRList[8]}` From dc4a89654cb4a85b431cd2544a5f67302ffd3d90 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 8 Jul 2022 18:24:25 -0600 Subject: [PATCH 18/41] Fix newline formatting --- tests/unit/GithubUtilsTest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index 4de67bbf130f..ca099ef8a74c 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -367,7 +367,7 @@ describe('GithubUtils', () => { const listStart = '- '; const ccApplauseLeads = 'cc @Expensify/applauseleads\r\n'; const deployBlockerHeader = '\r\n**Deploy Blockers:**'; - const internalQAHeader = '\r\n**Internal QA:**'; + const internalQAHeader = '\r\n\r\n**Internal QA:**'; const lineBreak = '\r\n'; const lineBreakDouble = '\r\n\r\n'; const assignOctocatHubot = ' - @octocat @hubot'; From c5bff083786ea20dd75a0db0a2256e02883db032 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Mon, 8 Aug 2022 15:06:43 -0600 Subject: [PATCH 19/41] Fix grouping and regex --- .github/actions/javascript/checkDeployBlockers/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/javascript/checkDeployBlockers/index.js b/.github/actions/javascript/checkDeployBlockers/index.js index b6c5a7d468db..cd8e15ff1643 100644 --- a/.github/actions/javascript/checkDeployBlockers/index.js +++ b/.github/actions/javascript/checkDeployBlockers/index.js @@ -223,11 +223,11 @@ class GithubUtils { } PRListSection = PRListSection[1]; const PRList = _.map( - [...PRListSection.matchAll(new RegExp(`- \\[ ] (${PULL_REQUEST_REGEX.source})`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ - url: match[1], - number: Number.parseInt(match[2], 10), - isVerified: match[3] === 'x', + url: match[2], + number: Number.parseInt(match[3], 10), + isVerified: match[1] === 'x', }), ); return _.sortBy(PRList, 'number'); From 55b916b0070a9510a577c081fb670950bd15e55f Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Mon, 8 Aug 2022 15:07:25 -0600 Subject: [PATCH 20/41] Update all regex to not look for accessibility checklist and fix grouping numbers --- .../javascript/awaitStagingDeploys/index.js | 19 +++++++++---------- .../javascript/getReleaseBody/index.js | 19 +++++++++---------- .../markPullRequestsAsDeployed/index.js | 19 +++++++++---------- .../javascript/verifySignedCommits/index.js | 19 +++++++++---------- 4 files changed, 36 insertions(+), 40 deletions(-) diff --git a/.github/actions/javascript/awaitStagingDeploys/index.js b/.github/actions/javascript/awaitStagingDeploys/index.js index 31de0b4bd281..f03e5ab3615f 100644 --- a/.github/actions/javascript/awaitStagingDeploys/index.js +++ b/.github/actions/javascript/awaitStagingDeploys/index.js @@ -253,12 +253,11 @@ class GithubUtils { } PRListSection = PRListSection[1]; const PRList = _.map( - [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[([ x])] QA\\s+- \\[([ x])] Accessibility`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ - url: match[1], - number: Number.parseInt(match[2], 10), - isVerified: match[3] === 'x', - isAccessible: match[4] === 'x', + url: match[2], + number: Number.parseInt(match[3], 10), + isVerified: match[1] === 'x', }), ); return _.sortBy(PRList, 'number'); @@ -12199,7 +12198,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12212,7 +12211,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12221,14 +12220,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup diff --git a/.github/actions/javascript/getReleaseBody/index.js b/.github/actions/javascript/getReleaseBody/index.js index 1ec34deef6be..f90e9a4298b8 100644 --- a/.github/actions/javascript/getReleaseBody/index.js +++ b/.github/actions/javascript/getReleaseBody/index.js @@ -212,12 +212,11 @@ class GithubUtils { } PRListSection = PRListSection[1]; const PRList = _.map( - [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[([ x])] QA\\s+- \\[([ x])] Accessibility`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ - url: match[1], - number: Number.parseInt(match[2], 10), - isVerified: match[3] === 'x', - isAccessible: match[4] === 'x', + url: match[2], + number: Number.parseInt(match[3], 10), + isVerified: match[1] === 'x', }), ); return _.sortBy(PRList, 'number'); @@ -12109,7 +12108,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12122,7 +12121,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12131,14 +12130,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/index.js b/.github/actions/javascript/markPullRequestsAsDeployed/index.js index 7f7471b302d8..b0553df8c529 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/index.js +++ b/.github/actions/javascript/markPullRequestsAsDeployed/index.js @@ -345,12 +345,11 @@ class GithubUtils { } PRListSection = PRListSection[1]; const PRList = _.map( - [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[([ x])] QA\\s+- \\[([ x])] Accessibility`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ - url: match[1], - number: Number.parseInt(match[2], 10), - isVerified: match[3] === 'x', - isAccessible: match[4] === 'x', + url: match[2], + number: Number.parseInt(match[3], 10), + isVerified: match[1] === 'x', }), ); return _.sortBy(PRList, 'number'); @@ -12285,7 +12284,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12298,7 +12297,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12307,14 +12306,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup diff --git a/.github/actions/javascript/verifySignedCommits/index.js b/.github/actions/javascript/verifySignedCommits/index.js index fdeb949901dc..0782816d907c 100644 --- a/.github/actions/javascript/verifySignedCommits/index.js +++ b/.github/actions/javascript/verifySignedCommits/index.js @@ -176,12 +176,11 @@ class GithubUtils { } PRListSection = PRListSection[1]; const PRList = _.map( - [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[([ x])] QA\\s+- \\[([ x])] Accessibility`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], match => ({ - url: match[1], - number: Number.parseInt(match[2], 10), - isVerified: match[3] === 'x', - isAccessible: match[4] === 'x', + url: match[2], + number: Number.parseInt(match[3], 10), + isVerified: match[1] === 'x', }), ); return _.sortBy(PRList, 'number'); @@ -12116,7 +12115,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12129,7 +12128,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12138,14 +12137,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup From b46990c8ce7880f11c22bbdc7767091c1d8c454f Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Mon, 8 Aug 2022 15:09:26 -0600 Subject: [PATCH 21/41] remove checks for accessibility --- .../actions/javascript/awaitStagingDeploys/index.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/actions/javascript/awaitStagingDeploys/index.js b/.github/actions/javascript/awaitStagingDeploys/index.js index f03e5ab3615f..ee3df7454924 100644 --- a/.github/actions/javascript/awaitStagingDeploys/index.js +++ b/.github/actions/javascript/awaitStagingDeploys/index.js @@ -294,7 +294,7 @@ class GithubUtils { * @private * * @param {Object} issue - * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean, isAccessible: Boolean}] + * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashInternalQA(issue) { let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:- \[[ x]].*\r?\n)+)/) || []; @@ -308,7 +308,6 @@ class GithubUtils { url: match[2].split('-')[0].trim(), number: Number.parseInt(match[3], 10), isResolved: match[1] === 'x', - isAccessible: false, }), ); return _.sortBy(internalQAPRs, 'number'); @@ -320,7 +319,6 @@ 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} [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. * @param {Array} [resolvedInternalQAPRs] - The list of Internal QA PR URLs which have been resolved. @@ -332,7 +330,6 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], resolvedInternalQAPRs = [], @@ -369,7 +366,6 @@ class GithubUtils { ); 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) @@ -390,9 +386,8 @@ class GithubUtils { if (!_.isEmpty(sortedPRList)) { issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += `\r\n\r\n- ${URL}`; - issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; - issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; + issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; + issueBody += ` ${URL}\r\n`; }); } From 1149e783034cae883a407fa955ea514340709819 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Mon, 8 Aug 2022 15:12:14 -0600 Subject: [PATCH 22/41] remove accessibility arrays, and fix regex --- .../actions/javascript/checkDeployBlockers/index.js | 3 +-- .../javascript/createOrUpdateStagingDeploy/index.js | 3 +-- .github/actions/javascript/getReleaseBody/index.js | 11 +++-------- .../javascript/markPullRequestsAsDeployed/index.js | 10 +++------- .../actions/javascript/verifySignedCommits/index.js | 11 +++-------- 5 files changed, 11 insertions(+), 27 deletions(-) diff --git a/.github/actions/javascript/checkDeployBlockers/index.js b/.github/actions/javascript/checkDeployBlockers/index.js index cd8e15ff1643..6e6205bf656a 100644 --- a/.github/actions/javascript/checkDeployBlockers/index.js +++ b/.github/actions/javascript/checkDeployBlockers/index.js @@ -264,7 +264,7 @@ class GithubUtils { * @private * * @param {Object} issue - * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean, isAccessible: Boolean}] + * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashInternalQA(issue) { let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:- \[[ x]].*\r?\n)+)/) || []; @@ -278,7 +278,6 @@ class GithubUtils { url: match[2].split('-')[0].trim(), number: Number.parseInt(match[3], 10), isResolved: match[1] === 'x', - isAccessible: false, }), ); return _.sortBy(internalQAPRs, 'number'); diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index 80af17c4a40a..d2ddbbecc1e6 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -491,7 +491,7 @@ class GithubUtils { * @private * * @param {Object} issue - * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean, isAccessible: Boolean}] + * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashInternalQA(issue) { let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:- \[[ x]].*\r?\n)+)/) || []; @@ -505,7 +505,6 @@ class GithubUtils { url: match[2].split('-')[0].trim(), number: Number.parseInt(match[3], 10), isResolved: match[1] === 'x', - isAccessible: false, }), ); return _.sortBy(internalQAPRs, 'number'); diff --git a/.github/actions/javascript/getReleaseBody/index.js b/.github/actions/javascript/getReleaseBody/index.js index f90e9a4298b8..30377dbff7c5 100644 --- a/.github/actions/javascript/getReleaseBody/index.js +++ b/.github/actions/javascript/getReleaseBody/index.js @@ -253,7 +253,7 @@ class GithubUtils { * @private * * @param {Object} issue - * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean, isAccessible: Boolean}] + * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashInternalQA(issue) { let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:- \[[ x]].*\r?\n)+)/) || []; @@ -267,7 +267,6 @@ class GithubUtils { url: match[2].split('-')[0].trim(), number: Number.parseInt(match[3], 10), isResolved: match[1] === 'x', - isAccessible: false, }), ); return _.sortBy(internalQAPRs, 'number'); @@ -279,7 +278,6 @@ 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} [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. * @param {Array} [resolvedInternalQAPRs] - The list of Internal QA PR URLs which have been resolved. @@ -291,7 +289,6 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], resolvedInternalQAPRs = [], @@ -328,7 +325,6 @@ class GithubUtils { ); 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) @@ -349,9 +345,8 @@ class GithubUtils { if (!_.isEmpty(sortedPRList)) { issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += `\r\n\r\n- ${URL}`; - issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; - issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; + issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; + issueBody += ` ${URL}\r\n`; }); } diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/index.js b/.github/actions/javascript/markPullRequestsAsDeployed/index.js index b0553df8c529..baa6f9e95154 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/index.js +++ b/.github/actions/javascript/markPullRequestsAsDeployed/index.js @@ -386,7 +386,7 @@ class GithubUtils { * @private * * @param {Object} issue - * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean, isAccessible: Boolean}] + * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashInternalQA(issue) { let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:- \[[ x]].*\r?\n)+)/) || []; @@ -400,7 +400,6 @@ class GithubUtils { url: match[2].split('-')[0].trim(), number: Number.parseInt(match[3], 10), isResolved: match[1] === 'x', - isAccessible: false, }), ); return _.sortBy(internalQAPRs, 'number'); @@ -412,7 +411,6 @@ 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} [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. * @param {Array} [resolvedInternalQAPRs] - The list of Internal QA PR URLs which have been resolved. @@ -424,7 +422,6 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], resolvedInternalQAPRs = [], @@ -461,7 +458,6 @@ class GithubUtils { ); 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) @@ -483,8 +479,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(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; - issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; + issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; + issueBody += ` ${URL}\r\n`; }); } diff --git a/.github/actions/javascript/verifySignedCommits/index.js b/.github/actions/javascript/verifySignedCommits/index.js index 0782816d907c..08439de3e931 100644 --- a/.github/actions/javascript/verifySignedCommits/index.js +++ b/.github/actions/javascript/verifySignedCommits/index.js @@ -217,7 +217,7 @@ class GithubUtils { * @private * * @param {Object} issue - * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean, isAccessible: Boolean}] + * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashInternalQA(issue) { let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:- \[[ x]].*\r?\n)+)/) || []; @@ -231,7 +231,6 @@ class GithubUtils { url: match[2].split('-')[0].trim(), number: Number.parseInt(match[3], 10), isResolved: match[1] === 'x', - isAccessible: false, }), ); return _.sortBy(internalQAPRs, 'number'); @@ -243,7 +242,6 @@ 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} [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. * @param {Array} [resolvedInternalQAPRs] - The list of Internal QA PR URLs which have been resolved. @@ -255,7 +253,6 @@ class GithubUtils { tag, PRList, verifiedPRList = [], - accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], resolvedInternalQAPRs = [], @@ -292,7 +289,6 @@ class GithubUtils { ); 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) @@ -313,9 +309,8 @@ class GithubUtils { if (!_.isEmpty(sortedPRList)) { issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += `\r\n\r\n- ${URL}`; - issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; - issueBody += _.contains(accessibleOrNoQAPRs, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; + issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; + issueBody += ` ${URL}\r\n`; }); } From e9bf8d7d2ac3761acbcfd330539ca935f0bb64c5 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Mon, 8 Aug 2022 15:16:27 -0600 Subject: [PATCH 23/41] remove accessibility from tests --- tests/unit/checkDeployBlockersTest.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/unit/checkDeployBlockersTest.js b/tests/unit/checkDeployBlockersTest.js index 83a83cdfc685..2c6da5e84cce 100644 --- a/tests/unit/checkDeployBlockersTest.js +++ b/tests/unit/checkDeployBlockersTest.js @@ -77,10 +77,8 @@ function mockIssue(prList, deployBlockerList) { **Compare Changes:** https://github.com/Expensify/App/compare/production...staging **This release contains changes from the following pull requests:** -${_.map(prList, ({url, isQASuccess, isAccessibilitySuccess}) => ` -- ${url} - - ${checkbox(isQASuccess)} QA - - ${checkbox(isAccessibilitySuccess)} Accessibility +${_.map(prList, ({url, isQASuccess}) => ` +- ${checkbox(isQASuccess)} ${url} `)} ${!_.isEmpty(deployBlockerList) ? ` @@ -95,7 +93,7 @@ cc @Expensify/applauseleads } describe('checkDeployBlockers', () => { - const allClearIssue = mockIssue([{url: 'https://github.com/Expensify/App/pull/6882', isQASuccess: true, isAccessibilitySuccess: true}]); + const allClearIssue = mockIssue([{url: 'https://github.com/Expensify/App/pull/6882', isQASuccess: true}]); describe('checkDeployBlockers', () => { test('Test an issue with all checked items and :shipit:', () => { @@ -129,7 +127,7 @@ describe('checkDeployBlockers', () => { }); test('Test an issue with all QA checked but no accessibility', () => { - mockGetIssue.mockResolvedValue(mockIssue([{url: 'https://github.com/Expensify/App/pull/6882', isQASuccess: true, isAccessibilitySuccess: false}])); + mockGetIssue.mockResolvedValue(mockIssue([{url: 'https://github.com/Expensify/App/pull/6882', isQASuccess: true}])); mockListComments.mockResolvedValue(baseComments); return run().then(() => { expect(mockSetOutput).toHaveBeenCalledWith('HAS_DEPLOY_BLOCKERS', false); @@ -138,7 +136,7 @@ describe('checkDeployBlockers', () => { test('Test an issue with all QA checked but not all deploy blockers', () => { mockGetIssue.mockResolvedValue(mockIssue( - [{url: 'https://github.com/Expensify/App/pull/6882', isQASuccess: true, isAccessibilitySuccess: false}], + [{url: 'https://github.com/Expensify/App/pull/6882', isQASuccess: true}], [{url: 'https://github.com/Expensify/App/pull/6883', isQASuccess: false}], )); mockListComments.mockResolvedValue(baseComments); @@ -149,7 +147,7 @@ describe('checkDeployBlockers', () => { test('Test an issue with all QA checked and all deploy blockers resolved', () => { mockGetIssue.mockResolvedValue(mockIssue( - [{url: 'https://github.com/Expensify/App/pull/6882', isQASuccess: true, isAccessibilitySuccess: false}], + [{url: 'https://github.com/Expensify/App/pull/6882', isQASuccess: true}], [{url: 'https://github.com/Expensify/App/pull/6883', isQASuccess: true}], )); mockListComments.mockResolvedValue(baseComments); From 1946178d687b5c5a776ecef4cb9a80c0b469002a Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Mon, 8 Aug 2022 15:16:42 -0600 Subject: [PATCH 24/41] remove unnecessary test --- tests/unit/checkDeployBlockersTest.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tests/unit/checkDeployBlockersTest.js b/tests/unit/checkDeployBlockersTest.js index 2c6da5e84cce..d5acbc67f0e7 100644 --- a/tests/unit/checkDeployBlockersTest.js +++ b/tests/unit/checkDeployBlockersTest.js @@ -126,14 +126,6 @@ describe('checkDeployBlockers', () => { }); }); - test('Test an issue with all QA checked but no accessibility', () => { - mockGetIssue.mockResolvedValue(mockIssue([{url: 'https://github.com/Expensify/App/pull/6882', isQASuccess: true}])); - mockListComments.mockResolvedValue(baseComments); - return run().then(() => { - expect(mockSetOutput).toHaveBeenCalledWith('HAS_DEPLOY_BLOCKERS', false); - }); - }); - test('Test an issue with all QA checked but not all deploy blockers', () => { mockGetIssue.mockResolvedValue(mockIssue( [{url: 'https://github.com/Expensify/App/pull/6882', isQASuccess: true}], From 82f58e3644f06c10439c3f12e97ad3277187d96a Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Mon, 8 Aug 2022 15:20:33 -0600 Subject: [PATCH 25/41] Fix more regex --- .github/actions/javascript/awaitStagingDeploys/index.js | 2 +- .github/actions/javascript/getReleaseBody/index.js | 2 +- .github/actions/javascript/markPullRequestsAsDeployed/index.js | 2 +- .github/actions/javascript/verifySignedCommits/index.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/javascript/awaitStagingDeploys/index.js b/.github/actions/javascript/awaitStagingDeploys/index.js index ee3df7454924..4b09a08e8d56 100644 --- a/.github/actions/javascript/awaitStagingDeploys/index.js +++ b/.github/actions/javascript/awaitStagingDeploys/index.js @@ -245,7 +245,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*(?:\r?\n)*((?:.*\r?\n(?:\s+-\s.*\r?\n)+\r?\n)+)/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); diff --git a/.github/actions/javascript/getReleaseBody/index.js b/.github/actions/javascript/getReleaseBody/index.js index 30377dbff7c5..7ceab21eddd4 100644 --- a/.github/actions/javascript/getReleaseBody/index.js +++ b/.github/actions/javascript/getReleaseBody/index.js @@ -204,7 +204,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*(?:\r?\n)*((?:.*\r?\n(?:\s+-\s.*\r?\n)+\r?\n)+)/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/index.js b/.github/actions/javascript/markPullRequestsAsDeployed/index.js index baa6f9e95154..8483a691ba69 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/index.js +++ b/.github/actions/javascript/markPullRequestsAsDeployed/index.js @@ -337,7 +337,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*(?:\r?\n)*((?:.*\r?\n(?:\s+-\s.*\r?\n)+\r?\n)+)/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); diff --git a/.github/actions/javascript/verifySignedCommits/index.js b/.github/actions/javascript/verifySignedCommits/index.js index 08439de3e931..9f134dea7a90 100644 --- a/.github/actions/javascript/verifySignedCommits/index.js +++ b/.github/actions/javascript/verifySignedCommits/index.js @@ -168,7 +168,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*(?:\r?\n)*((?:.*\r?\n(?:\s+-\s.*\r?\n)+\r?\n)+)/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); From a13fc194f5d4f579d86dbc4ad9d0ff06d2c513b5 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Mon, 8 Aug 2022 16:03:47 -0600 Subject: [PATCH 26/41] update regex again --- .github/libs/GithubUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index eaebf3428a34..ab637bc30dc7 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -128,7 +128,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*(?:\r?\n)*((?:.*\r?\n(?:-\s.*\r?\n?)+)+)/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); From 67bf2cd32c6fdd0080afe2537dd8aafc372d28c3 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Mon, 8 Aug 2022 16:14:16 -0600 Subject: [PATCH 27/41] Remove unused vars --- tests/unit/GithubUtilsTest.js | 1 - tests/unit/createOrUpdateStagingDeployTest.js | 3 --- 2 files changed, 4 deletions(-) diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index 6f9ab76e2bde..f15ccac724b3 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -365,7 +365,6 @@ describe('GithubUtils', () => { const baseExpectedOutput = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n\r\n**This release contains changes from the following pull requests:**`; const openCheckbox = '- [ ] '; const closedCheckbox = '- [x] '; - const listStart = '- '; const ccApplauseLeads = 'cc @Expensify/applauseleads\r\n'; const deployBlockerHeader = '\r\n**Deploy Blockers:**'; const internalQAHeader = '\r\n\r\n**Internal QA:**'; diff --git a/tests/unit/createOrUpdateStagingDeployTest.js b/tests/unit/createOrUpdateStagingDeployTest.js index 218a97eb5724..d549f1efad26 100644 --- a/tests/unit/createOrUpdateStagingDeployTest.js +++ b/tests/unit/createOrUpdateStagingDeployTest.js @@ -99,8 +99,6 @@ const baseIssueList = [ const baseExpectedOutput = (tag = '1.0.2-1') => `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n\r\n**This release contains changes from the following pull requests:**`; const openCheckbox = '- [ ] '; const closedCheckbox = '- [x] '; -const listStart = '- '; -const QA = 'QA'; const deployerVerificationsHeader = '\r\n**Deployer verifications:**'; // eslint-disable-next-line max-len const timingDashboardVerification = 'I checked the [App Timing Dashboard](https://graphs.expensify.com/grafana/d/yj2EobAGz/app-timing?orgId=1) and verified this release does not cause a noticeable performance regression.'; @@ -110,7 +108,6 @@ const ccApplauseLeads = 'cc @Expensify/applauseleads\r\n'; const deployBlockerHeader = '\r\n**Deploy Blockers:**'; const lineBreak = '\r\n'; const lineBreakDouble = '\r\n\r\n'; -const indent = ' '; describe('createOrUpdateStagingDeployCash', () => { const closedStagingDeployCash = { From 9e5bafec2d5feb381b11c5b6a0be9d0e53b70f2a Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Wed, 10 Aug 2022 10:16:57 -0600 Subject: [PATCH 28/41] Make sure to add another newline after all PRs (even the last one) --- .github/actions/javascript/getPullRequestDetails/index.js | 2 +- .github/actions/javascript/isPullRequestMergeable/index.js | 2 +- .github/actions/javascript/isStagingDeployLocked/index.js | 2 +- .github/actions/javascript/reopenIssueWithComment/index.js | 2 +- .github/actions/javascript/triggerWorkflowAndWait/index.js | 2 +- .github/libs/GithubUtils.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/actions/javascript/getPullRequestDetails/index.js b/.github/actions/javascript/getPullRequestDetails/index.js index bc1804570328..11b829bad9a5 100644 --- a/.github/actions/javascript/getPullRequestDetails/index.js +++ b/.github/actions/javascript/getPullRequestDetails/index.js @@ -428,7 +428,7 @@ class GithubUtils { issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x]' : '\r\n - [ ]'; - issueBody += ` ${URL}`; + issueBody += ` ${URL}\r\n`; }); } diff --git a/.github/actions/javascript/isPullRequestMergeable/index.js b/.github/actions/javascript/isPullRequestMergeable/index.js index 07b733f158e1..4a903f62e2a9 100644 --- a/.github/actions/javascript/isPullRequestMergeable/index.js +++ b/.github/actions/javascript/isPullRequestMergeable/index.js @@ -378,7 +378,7 @@ class GithubUtils { issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x]' : '\r\n - [ ]'; - issueBody += ` ${URL}`; + issueBody += ` ${URL}\r\n`; }); } diff --git a/.github/actions/javascript/isStagingDeployLocked/index.js b/.github/actions/javascript/isStagingDeployLocked/index.js index c35f3e47b67a..fea63b6a2a97 100644 --- a/.github/actions/javascript/isStagingDeployLocked/index.js +++ b/.github/actions/javascript/isStagingDeployLocked/index.js @@ -310,7 +310,7 @@ class GithubUtils { issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x]' : '\r\n - [ ]'; - issueBody += ` ${URL}`; + issueBody += ` ${URL}\r\n`; }); } diff --git a/.github/actions/javascript/reopenIssueWithComment/index.js b/.github/actions/javascript/reopenIssueWithComment/index.js index e53ab9ddb2d1..3d382dafe673 100644 --- a/.github/actions/javascript/reopenIssueWithComment/index.js +++ b/.github/actions/javascript/reopenIssueWithComment/index.js @@ -321,7 +321,7 @@ class GithubUtils { issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x]' : '\r\n - [ ]'; - issueBody += ` ${URL}`; + issueBody += ` ${URL}\r\n`; }); } diff --git a/.github/actions/javascript/triggerWorkflowAndWait/index.js b/.github/actions/javascript/triggerWorkflowAndWait/index.js index 34ca47a16800..75dbb8a21916 100644 --- a/.github/actions/javascript/triggerWorkflowAndWait/index.js +++ b/.github/actions/javascript/triggerWorkflowAndWait/index.js @@ -490,7 +490,7 @@ class GithubUtils { issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x]' : '\r\n - [ ]'; - issueBody += ` ${URL}`; + issueBody += ` ${URL}\r\n`; }); } diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index ab637bc30dc7..f4ba22e2a974 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -270,7 +270,7 @@ class GithubUtils { issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n- [x]' : '\r\n- [ ]'; - issueBody += ` ${URL}`; + issueBody += ` ${URL}\r\n`; }); } From 4f0bc79adceacdb9ea2ef4c6cd9e95326206845a Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Wed, 10 Aug 2022 10:51:34 -0600 Subject: [PATCH 29/41] Fix regex to not get deployblockers too --- .github/libs/GithubUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index f4ba22e2a974..4a2839b8d88a 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -128,7 +128,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); From 781cb3a4ed2762fad9b54ddb61746f9ae20de7d9 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Wed, 10 Aug 2022 10:52:11 -0600 Subject: [PATCH 30/41] Fix expected to have correct spacing --- tests/unit/GithubUtilsTest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index f15ccac724b3..328b2981a988 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -25,7 +25,7 @@ describe('GithubUtils', () => { }, ], // eslint-disable-next-line max-len - body: '**Release Version:** `1.0.1-47`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n\r\n**This release contains changes from the following pull requests:**\r\n\r\n- [ ] https://github.com/Expensify/App/pull/21\r\n- [x] https://github.com/Expensify/App/pull/22\r\n- [ ] https://github.com/Expensify/App/pull/23', + body: '**Release Version:** `1.0.1-47`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n\r\n**This release contains changes from the following pull requests:**\r\n\r\n- [ ] https://github.com/Expensify/App/pull/21\r\n- [x] https://github.com/Expensify/App/pull/22\r\n- [ ] https://github.com/Expensify/App/pull/23\r\n\r\n', }; const issueWithDeployBlockers = {...baseIssue}; // eslint-disable-next-line max-len From 6002eb2d0eb7eba2268810c746dc22bd55285e76 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Wed, 10 Aug 2022 12:48:21 -0600 Subject: [PATCH 31/41] Fix expected results for new format --- tests/unit/GithubUtilsTest.js | 63 ++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index 328b2981a988..d891aba9cbba 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -380,10 +380,11 @@ describe('GithubUtils', () => { // Valid output which will be reused in the deploy blocker tests const allVerifiedExpectedOutput = `${baseExpectedOutput}` + `${lineBreak}${closedCheckbox}${basePRList[2]}` - + `${lineBreak}${closedCheckbox}${basePRList[0]}` - + `${lineBreak}${closedCheckbox}${basePRList[1]}` - + `${lineBreak}${closedCheckbox}${basePRList[5]}` - + `${lineBreak}${closedCheckbox}${basePRList[6]}`; + + `${lineBreakDouble}${closedCheckbox}${basePRList[0]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[1]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}` + + `${lineBreak}`; test('Test no verified PRs', () => ( githubUtils.generateStagingDeployCashBody(tag, basePRList) @@ -391,11 +392,11 @@ describe('GithubUtils', () => { expect(issueBody).toBe( `${baseExpectedOutput}` + `${lineBreak}${openCheckbox}${basePRList[2]}` - + `${lineBreak}${openCheckbox}${basePRList[0]}` - + `${lineBreak}${openCheckbox}${basePRList[1]}` - + `${lineBreak}${closedCheckbox}${basePRList[5]}` - + `${lineBreak}${closedCheckbox}${basePRList[6]}` - + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreakDouble}${openCheckbox}${basePRList[0]}` + + `${lineBreakDouble}${openCheckbox}${basePRList[1]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}` + + `${lineBreakDouble}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + `${lineBreak}${openCheckbox}${firebaseVerification}` + `${lineBreakDouble}${ccApplauseLeads}`, @@ -409,11 +410,11 @@ describe('GithubUtils', () => { expect(issueBody).toBe( `${baseExpectedOutput}` + `${lineBreak}${openCheckbox}${basePRList[2]}` - + `${lineBreak}${closedCheckbox}${basePRList[0]}` - + `${lineBreak}${openCheckbox}${basePRList[1]}` - + `${lineBreak}${closedCheckbox}${basePRList[5]}` - + `${lineBreak}${closedCheckbox}${basePRList[6]}` - + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[0]}` + + `${lineBreakDouble}${openCheckbox}${basePRList[1]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}` + + `${lineBreakDouble}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + `${lineBreak}${openCheckbox}${firebaseVerification}` + `${lineBreakDouble}${ccApplauseLeads}`, @@ -467,16 +468,16 @@ describe('GithubUtils', () => { )); test('Test all resolved deploy blockers', () => ( - githubUtils.generateStagingDeployCashBody(tag, basePRList, basePRList, baseDeployBlockerList, baseDeployBlockerList, baseDeployBlockerList) + githubUtils.generateStagingDeployCashBody(tag, basePRList, basePRList, baseDeployBlockerList, baseDeployBlockerList) .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` + `${lineBreak}${closedCheckbox}${basePRList[2]}` - + `${lineBreak}${closedCheckbox}${basePRList[0]}` - + `${lineBreak}${closedCheckbox}${basePRList[1]}` - + `${lineBreak}${closedCheckbox}${basePRList[5]}` - + `${lineBreak}${closedCheckbox}${basePRList[6]}` - + `${lineBreak}${deployBlockerHeader}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[0]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[1]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}${lineBreak}` + + `${lineBreakDouble}${deployBlockerHeader}` + `${lineBreak}${closedCheckbox}${baseDeployBlockerList[0]}` + `${lineBreak}${closedCheckbox}${baseDeployBlockerList[1]}` + `${lineBreak}${deployerVerificationsHeader}` @@ -493,11 +494,11 @@ describe('GithubUtils', () => { expect(issueBody).toBe( `${baseExpectedOutput}` + `${lineBreak}${openCheckbox}${basePRList[2]}` - + `${lineBreak}${openCheckbox}${basePRList[0]}` - + `${lineBreak}${openCheckbox}${basePRList[1]}` - + `${lineBreak}${closedCheckbox}${basePRList[5]}` - + `${lineBreak}${closedCheckbox}${basePRList[6]}` - + `${lineBreak}${internalQAHeader}` + + `${lineBreakDouble}${openCheckbox}${basePRList[0]}` + + `${lineBreakDouble}${openCheckbox}${basePRList[1]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}` + + `${lineBreakDouble}${internalQAHeader}` + `${lineBreak}${openCheckbox}${internalQAPRList[0]}${assignOctocatHubot}` + `${lineBreak}${openCheckbox}${internalQAPRList[1]}${assignOctocatHubot}` + `${lineBreak}${deployerVerificationsHeader}` @@ -509,16 +510,16 @@ describe('GithubUtils', () => { )); test('Test some verified internalQA PRs', () => ( - githubUtils.generateStagingDeployCashBody(tag, [...basePRList, ...internalQAPRList], [], [], [], [], [internalQAPRList[0]]) + githubUtils.generateStagingDeployCashBody(tag, [...basePRList, ...internalQAPRList], [], [], [], [internalQAPRList[0]]) .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` + `${lineBreak}${openCheckbox}${basePRList[2]}` - + `${lineBreak}${openCheckbox}${basePRList[0]}` - + `${lineBreak}${openCheckbox}${basePRList[1]}` - + `${lineBreak}${closedCheckbox}${basePRList[5]}` - + `${lineBreak}${closedCheckbox}${basePRList[6]}` - + `${lineBreak}${internalQAHeader}` + + `${lineBreakDouble}${openCheckbox}${basePRList[0]}` + + `${lineBreakDouble}${openCheckbox}${basePRList[1]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` + + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}` + + `${lineBreakDouble}${internalQAHeader}` + `${lineBreak}${closedCheckbox}${internalQAPRList[0]}${assignOctocatHubot}` + `${lineBreak}${openCheckbox}${internalQAPRList[1]}${assignOctocatHubot}` + `${lineBreak}${deployerVerificationsHeader}` From cdb1c43e5f56e95acba04252ae116d7ce0946299 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Wed, 10 Aug 2022 12:48:45 -0600 Subject: [PATCH 32/41] Fix number of params now that we aren't passing accessibilityPRs --- tests/unit/GithubUtilsTest.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index d891aba9cbba..337f75b34718 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -436,7 +436,7 @@ describe('GithubUtils', () => { )); test('Test no resolved deploy blockers', () => ( - githubUtils.generateStagingDeployCashBody(tag, basePRList, basePRList, [], baseDeployBlockerList) + githubUtils.generateStagingDeployCashBody(tag, basePRList, basePRList, baseDeployBlockerList) .then((issueBody) => { expect(issueBody).toBe( `${allVerifiedExpectedOutput}` @@ -445,14 +445,14 @@ describe('GithubUtils', () => { + `${lineBreak}${openCheckbox}${baseDeployBlockerList[1]}` + `${lineBreak}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` - + `${lineBreak}${openCheckbox}${firebaseVerification}` - + `${lineBreakDouble}${ccApplauseLeads}`, + + `${lineBreak}${openCheckbox}${firebaseVerification}${lineBreak}` + + `${lineBreak}${ccApplauseLeads}`, ); }) )); test('Test some resolved deploy blockers', () => ( - githubUtils.generateStagingDeployCashBody(tag, basePRList, basePRList, [], baseDeployBlockerList, [baseDeployBlockerList[0]]) + githubUtils.generateStagingDeployCashBody(tag, basePRList, basePRList, baseDeployBlockerList, [baseDeployBlockerList[0]]) .then((issueBody) => { expect(issueBody).toBe( `${allVerifiedExpectedOutput}` From 8b31bf3616127f754eccd2204065e7017cb8a3ad Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Wed, 10 Aug 2022 13:06:33 -0600 Subject: [PATCH 33/41] Fix double spacing issue --- .github/libs/GithubUtils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index 4a2839b8d88a..656e86edd164 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -267,9 +267,9 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**'; + issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; _.each(sortedPRList, (URL) => { - issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n- [x]' : '\r\n- [ ]'; + issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; }); } From 7dbe6aceb0f46bd73ac7a7001d5901e2f527c1b4 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Wed, 10 Aug 2022 13:07:01 -0600 Subject: [PATCH 34/41] Fix too many spaces before deploy blocker and tests --- .github/libs/GithubUtils.js | 2 +- tests/unit/GithubUtilsTest.js | 52 +++++++++++++++++------------------ 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index 656e86edd164..500e9d07bf74 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -288,7 +288,7 @@ class GithubUtils { // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; + issueBody += '\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; issueBody += URL; diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index 337f75b34718..bfdefab34818 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -380,10 +380,10 @@ describe('GithubUtils', () => { // Valid output which will be reused in the deploy blocker tests const allVerifiedExpectedOutput = `${baseExpectedOutput}` + `${lineBreak}${closedCheckbox}${basePRList[2]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[0]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[1]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}` + + `${lineBreak}${closedCheckbox}${basePRList[0]}` + + `${lineBreak}${closedCheckbox}${basePRList[1]}` + + `${lineBreak}${closedCheckbox}${basePRList[5]}` + + `${lineBreak}${closedCheckbox}${basePRList[6]}` + `${lineBreak}`; test('Test no verified PRs', () => ( @@ -392,10 +392,10 @@ describe('GithubUtils', () => { expect(issueBody).toBe( `${baseExpectedOutput}` + `${lineBreak}${openCheckbox}${basePRList[2]}` - + `${lineBreakDouble}${openCheckbox}${basePRList[0]}` - + `${lineBreakDouble}${openCheckbox}${basePRList[1]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}` + + `${lineBreak}${openCheckbox}${basePRList[0]}` + + `${lineBreak}${openCheckbox}${basePRList[1]}` + + `${lineBreak}${closedCheckbox}${basePRList[5]}` + + `${lineBreak}${closedCheckbox}${basePRList[6]}` + `${lineBreakDouble}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + `${lineBreak}${openCheckbox}${firebaseVerification}` @@ -410,10 +410,10 @@ describe('GithubUtils', () => { expect(issueBody).toBe( `${baseExpectedOutput}` + `${lineBreak}${openCheckbox}${basePRList[2]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[0]}` - + `${lineBreakDouble}${openCheckbox}${basePRList[1]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}` + + `${lineBreak}${closedCheckbox}${basePRList[0]}` + + `${lineBreak}${openCheckbox}${basePRList[1]}` + + `${lineBreak}${closedCheckbox}${basePRList[5]}` + + `${lineBreak}${closedCheckbox}${basePRList[6]}` + `${lineBreakDouble}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + `${lineBreak}${openCheckbox}${firebaseVerification}` @@ -440,7 +440,7 @@ describe('GithubUtils', () => { .then((issueBody) => { expect(issueBody).toBe( `${allVerifiedExpectedOutput}` - + `${lineBreakDouble}${deployBlockerHeader}` + + `${lineBreak}${deployBlockerHeader}` + `${lineBreak}${openCheckbox}${baseDeployBlockerList[0]}` + `${lineBreak}${openCheckbox}${baseDeployBlockerList[1]}` + `${lineBreak}${deployerVerificationsHeader}` @@ -456,7 +456,7 @@ describe('GithubUtils', () => { .then((issueBody) => { expect(issueBody).toBe( `${allVerifiedExpectedOutput}` - + `${lineBreakDouble}${deployBlockerHeader}` + + `${lineBreak}${deployBlockerHeader}` + `${lineBreak}${closedCheckbox}${baseDeployBlockerList[0]}` + `${lineBreak}${openCheckbox}${baseDeployBlockerList[1]}` + `${lineBreak}${deployerVerificationsHeader}` @@ -473,10 +473,10 @@ describe('GithubUtils', () => { expect(issueBody).toBe( `${baseExpectedOutput}` + `${lineBreak}${closedCheckbox}${basePRList[2]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[0]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[1]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}${lineBreak}` + + `${lineBreak}${closedCheckbox}${basePRList[0]}` + + `${lineBreak}${closedCheckbox}${basePRList[1]}` + + `${lineBreak}${closedCheckbox}${basePRList[5]}` + + `${lineBreak}${closedCheckbox}${basePRList[6]}` + `${lineBreakDouble}${deployBlockerHeader}` + `${lineBreak}${closedCheckbox}${baseDeployBlockerList[0]}` + `${lineBreak}${closedCheckbox}${baseDeployBlockerList[1]}` @@ -494,10 +494,10 @@ describe('GithubUtils', () => { expect(issueBody).toBe( `${baseExpectedOutput}` + `${lineBreak}${openCheckbox}${basePRList[2]}` - + `${lineBreakDouble}${openCheckbox}${basePRList[0]}` - + `${lineBreakDouble}${openCheckbox}${basePRList[1]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}` + + `${lineBreak}${openCheckbox}${basePRList[0]}` + + `${lineBreak}${openCheckbox}${basePRList[1]}` + + `${lineBreak}${closedCheckbox}${basePRList[5]}` + + `${lineBreak}${closedCheckbox}${basePRList[6]}` + `${lineBreakDouble}${internalQAHeader}` + `${lineBreak}${openCheckbox}${internalQAPRList[0]}${assignOctocatHubot}` + `${lineBreak}${openCheckbox}${internalQAPRList[1]}${assignOctocatHubot}` @@ -515,10 +515,10 @@ describe('GithubUtils', () => { expect(issueBody).toBe( `${baseExpectedOutput}` + `${lineBreak}${openCheckbox}${basePRList[2]}` - + `${lineBreakDouble}${openCheckbox}${basePRList[0]}` - + `${lineBreakDouble}${openCheckbox}${basePRList[1]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[5]}` - + `${lineBreakDouble}${closedCheckbox}${basePRList[6]}` + + `${lineBreak}${openCheckbox}${basePRList[0]}` + + `${lineBreak}${openCheckbox}${basePRList[1]}` + + `${lineBreak}${closedCheckbox}${basePRList[5]}` + + `${lineBreak}${closedCheckbox}${basePRList[6]}` + `${lineBreakDouble}${internalQAHeader}` + `${lineBreak}${closedCheckbox}${internalQAPRList[0]}${assignOctocatHubot}` + `${lineBreak}${openCheckbox}${internalQAPRList[1]}${assignOctocatHubot}` From d3957f14c22170ff4683d831bafee3075d25e559 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Wed, 10 Aug 2022 13:29:02 -0600 Subject: [PATCH 35/41] Build github actions --- .../javascript/awaitStagingDeploys/index.js | 16 +++++++-------- .../javascript/checkDeployBlockers/index.js | 16 +++++++-------- .../createOrUpdateStagingDeploy/index.js | 20 +++++++++---------- .../javascript/getPullRequestDetails/index.js | 18 ++++++++--------- .../javascript/getReleaseBody/index.js | 16 +++++++-------- .../isPullRequestMergeable/index.js | 18 ++++++++--------- .../javascript/isStagingDeployLocked/index.js | 18 ++++++++--------- .../markPullRequestsAsDeployed/index.js | 17 ++++++++-------- .../reopenIssueWithComment/index.js | 18 ++++++++--------- .../triggerWorkflowAndWait/index.js | 18 ++++++++--------- .../javascript/verifySignedCommits/index.js | 16 +++++++-------- 11 files changed, 95 insertions(+), 96 deletions(-) diff --git a/.github/actions/javascript/awaitStagingDeploys/index.js b/.github/actions/javascript/awaitStagingDeploys/index.js index 4b09a08e8d56..6f97e62f55a9 100644 --- a/.github/actions/javascript/awaitStagingDeploys/index.js +++ b/.github/actions/javascript/awaitStagingDeploys/index.js @@ -245,7 +245,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -384,7 +384,7 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**'; + issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; _.each(sortedPRList, (URL) => { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; @@ -405,7 +405,7 @@ class GithubUtils { // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; + issueBody += '\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; issueBody += URL; @@ -12193,7 +12193,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12206,7 +12206,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12215,14 +12215,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup diff --git a/.github/actions/javascript/checkDeployBlockers/index.js b/.github/actions/javascript/checkDeployBlockers/index.js index 6e6205bf656a..be2610bbdea4 100644 --- a/.github/actions/javascript/checkDeployBlockers/index.js +++ b/.github/actions/javascript/checkDeployBlockers/index.js @@ -215,7 +215,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -354,7 +354,7 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**'; + issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; _.each(sortedPRList, (URL) => { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; @@ -375,7 +375,7 @@ class GithubUtils { // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; + issueBody += '\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; issueBody += URL; @@ -12114,7 +12114,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12127,7 +12127,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12136,14 +12136,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index d2ddbbecc1e6..af4bd9a9804d 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -442,7 +442,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -581,7 +581,7 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**'; + issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; _.each(sortedPRList, (URL) => { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; @@ -602,7 +602,7 @@ class GithubUtils { // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; + issueBody += '\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; issueBody += URL; @@ -18041,7 +18041,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -18054,7 +18054,7 @@ module.exports = require("zlib");; /******/ loaded: false, /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -18063,14 +18063,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Flag the module as loaded /******/ module.loaded = true; -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/node module decorator */ /******/ (() => { @@ -18080,9 +18080,9 @@ module.exports = require("zlib");; /******/ return module; /******/ }; /******/ })(); -/******/ +/******/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup diff --git a/.github/actions/javascript/getPullRequestDetails/index.js b/.github/actions/javascript/getPullRequestDetails/index.js index 11b829bad9a5..78fe79248d2d 100644 --- a/.github/actions/javascript/getPullRequestDetails/index.js +++ b/.github/actions/javascript/getPullRequestDetails/index.js @@ -286,7 +286,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -425,9 +425,9 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**'; + issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; _.each(sortedPRList, (URL) => { - issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x]' : '\r\n - [ ]'; + issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; }); } @@ -446,7 +446,7 @@ class GithubUtils { // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; + issueBody += '\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; issueBody += URL; @@ -12185,7 +12185,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12198,7 +12198,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12207,14 +12207,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup diff --git a/.github/actions/javascript/getReleaseBody/index.js b/.github/actions/javascript/getReleaseBody/index.js index 7ceab21eddd4..dca1ac86ca27 100644 --- a/.github/actions/javascript/getReleaseBody/index.js +++ b/.github/actions/javascript/getReleaseBody/index.js @@ -204,7 +204,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -343,7 +343,7 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**'; + issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; _.each(sortedPRList, (URL) => { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; @@ -364,7 +364,7 @@ class GithubUtils { // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; + issueBody += '\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; issueBody += URL; @@ -12103,7 +12103,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12116,7 +12116,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12125,14 +12125,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup diff --git a/.github/actions/javascript/isPullRequestMergeable/index.js b/.github/actions/javascript/isPullRequestMergeable/index.js index 4a903f62e2a9..e77d1f55e898 100644 --- a/.github/actions/javascript/isPullRequestMergeable/index.js +++ b/.github/actions/javascript/isPullRequestMergeable/index.js @@ -236,7 +236,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -375,9 +375,9 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**'; + issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; _.each(sortedPRList, (URL) => { - issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x]' : '\r\n - [ ]'; + issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; }); } @@ -396,7 +396,7 @@ class GithubUtils { // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; + issueBody += '\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; issueBody += URL; @@ -12184,7 +12184,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12197,7 +12197,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12206,14 +12206,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup diff --git a/.github/actions/javascript/isStagingDeployLocked/index.js b/.github/actions/javascript/isStagingDeployLocked/index.js index fea63b6a2a97..bb6fb9b2eca7 100644 --- a/.github/actions/javascript/isStagingDeployLocked/index.js +++ b/.github/actions/javascript/isStagingDeployLocked/index.js @@ -168,7 +168,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -307,9 +307,9 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**'; + issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; _.each(sortedPRList, (URL) => { - issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x]' : '\r\n - [ ]'; + issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; }); } @@ -328,7 +328,7 @@ class GithubUtils { // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; + issueBody += '\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; issueBody += URL; @@ -12067,7 +12067,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12080,7 +12080,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12089,14 +12089,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/index.js b/.github/actions/javascript/markPullRequestsAsDeployed/index.js index 8483a691ba69..9b591661bbc2 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/index.js +++ b/.github/actions/javascript/markPullRequestsAsDeployed/index.js @@ -337,7 +337,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -476,9 +476,8 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**'; + issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; _.each(sortedPRList, (URL) => { - issueBody += `\r\n\r\n- ${URL}`; issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; }); @@ -498,7 +497,7 @@ class GithubUtils { // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; + issueBody += '\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; issueBody += URL; @@ -12280,7 +12279,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12293,7 +12292,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12302,14 +12301,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup diff --git a/.github/actions/javascript/reopenIssueWithComment/index.js b/.github/actions/javascript/reopenIssueWithComment/index.js index 3d382dafe673..af0b6b8c22fb 100644 --- a/.github/actions/javascript/reopenIssueWithComment/index.js +++ b/.github/actions/javascript/reopenIssueWithComment/index.js @@ -179,7 +179,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -318,9 +318,9 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**'; + issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; _.each(sortedPRList, (URL) => { - issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x]' : '\r\n - [ ]'; + issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; }); } @@ -339,7 +339,7 @@ class GithubUtils { // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; + issueBody += '\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; issueBody += URL; @@ -12078,7 +12078,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12091,7 +12091,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12100,14 +12100,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup diff --git a/.github/actions/javascript/triggerWorkflowAndWait/index.js b/.github/actions/javascript/triggerWorkflowAndWait/index.js index 75dbb8a21916..fbf1dae986fe 100644 --- a/.github/actions/javascript/triggerWorkflowAndWait/index.js +++ b/.github/actions/javascript/triggerWorkflowAndWait/index.js @@ -348,7 +348,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -487,9 +487,9 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**'; + issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; _.each(sortedPRList, (URL) => { - issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '\r\n - [x]' : '\r\n - [ ]'; + issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; }); } @@ -508,7 +508,7 @@ class GithubUtils { // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; + issueBody += '\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; issueBody += URL; @@ -12296,7 +12296,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12309,7 +12309,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12318,14 +12318,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup diff --git a/.github/actions/javascript/verifySignedCommits/index.js b/.github/actions/javascript/verifySignedCommits/index.js index 9f134dea7a90..97e7200245b9 100644 --- a/.github/actions/javascript/verifySignedCommits/index.js +++ b/.github/actions/javascript/verifySignedCommits/index.js @@ -168,7 +168,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -307,7 +307,7 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**'; + issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; _.each(sortedPRList, (URL) => { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; @@ -328,7 +328,7 @@ class GithubUtils { // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; + issueBody += '\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; issueBody += URL; @@ -12110,7 +12110,7 @@ module.exports = require("zlib");; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; -/******/ +/******/ /******/ // The require function /******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache @@ -12123,7 +12123,7 @@ module.exports = require("zlib");; /******/ // no module.loaded needed /******/ exports: {} /******/ }; -/******/ +/******/ /******/ // Execute the module function /******/ var threw = true; /******/ try { @@ -12132,14 +12132,14 @@ module.exports = require("zlib");; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } -/******/ +/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ +/******/ /************************************************************************/ /******/ /* webpack/runtime/compat */ -/******/ +/******/ /******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup From 3b353f1e327d0e7d5726623d5542e22ae6077228 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 12 Aug 2022 11:24:59 -0600 Subject: [PATCH 36/41] Fix regex again --- .github/libs/GithubUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index 500e9d07bf74..6c62a121bdd1 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -128,7 +128,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n\r?\n\*/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); From 94e7cc443b60f9b216050c1e4fe58ede912027a4 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 12 Aug 2022 11:25:23 -0600 Subject: [PATCH 37/41] Fix expected spacing --- tests/unit/GithubUtilsTest.js | 4 ++-- tests/unit/createOrUpdateStagingDeployTest.js | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index bfdefab34818..98b4eb0ffd62 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -25,7 +25,7 @@ describe('GithubUtils', () => { }, ], // eslint-disable-next-line max-len - body: '**Release Version:** `1.0.1-47`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n\r\n**This release contains changes from the following pull requests:**\r\n\r\n- [ ] https://github.com/Expensify/App/pull/21\r\n- [x] https://github.com/Expensify/App/pull/22\r\n- [ ] https://github.com/Expensify/App/pull/23\r\n\r\n', + body: '**Release Version:** `1.0.1-47`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n\r\n**This release contains changes from the following pull requests:**\r\n- [ ] https://github.com/Expensify/App/pull/21\r\n- [x] https://github.com/Expensify/App/pull/22\r\n- [ ] https://github.com/Expensify/App/pull/23\r\n\r\n', }; const issueWithDeployBlockers = {...baseIssue}; // eslint-disable-next-line max-len @@ -362,7 +362,7 @@ describe('GithubUtils', () => { ]; // eslint-disable-next-line max-len - const baseExpectedOutput = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n\r\n**This release contains changes from the following pull requests:**`; + const baseExpectedOutput = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n\r\n**This release contains changes from the following pull requests:**\r\n`; const openCheckbox = '- [ ] '; const closedCheckbox = '- [x] '; const ccApplauseLeads = 'cc @Expensify/applauseleads\r\n'; diff --git a/tests/unit/createOrUpdateStagingDeployTest.js b/tests/unit/createOrUpdateStagingDeployTest.js index d549f1efad26..b81238627c28 100644 --- a/tests/unit/createOrUpdateStagingDeployTest.js +++ b/tests/unit/createOrUpdateStagingDeployTest.js @@ -96,7 +96,7 @@ const baseIssueList = [ 'https://github.com/Expensify/App/issues/12', ]; // eslint-disable-next-line max-len -const baseExpectedOutput = (tag = '1.0.2-1') => `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n\r\n**This release contains changes from the following pull requests:**`; +const baseExpectedOutput = (tag = '1.0.2-1') => `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n\r\n**This release contains changes from the following pull requests:**\r\n`; const openCheckbox = '- [ ] '; const closedCheckbox = '- [x] '; const deployerVerificationsHeader = '\r\n**Deployer verifications:**'; @@ -167,10 +167,10 @@ describe('createOrUpdateStagingDeployCash', () => { html_url: 'https://github.com/Expensify/App/issues/29', assignees: [GithubUtils.APPLAUSE_BOT], body: `${baseExpectedOutput()}` - + `${lineBreak}${openCheckbox}${basePRList[5]}` + + `${openCheckbox}${basePRList[5]}` + `${lineBreak}${openCheckbox}${basePRList[6]}` + `${lineBreak}${openCheckbox}${basePRList[7]}` - + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreakDouble}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + `${lineBreak}${openCheckbox}${firebaseVerification}` + `${lineBreakDouble}${ccApplauseLeads}`, @@ -281,7 +281,7 @@ describe('createOrUpdateStagingDeployCash', () => { html_url: `https://github.com/Expensify/App/issues/${openStagingDeployCashBefore.number}`, // eslint-disable-next-line max-len body: `${baseExpectedOutput('1.0.2-2')}` - + `${lineBreak}${openCheckbox}${basePRList[5]}` + + `${openCheckbox}${basePRList[5]}` + `${lineBreak}${closedCheckbox}${basePRList[6]}` + `${lineBreak}${openCheckbox}${basePRList[7]}` + `${lineBreak}${openCheckbox}${basePRList[8]}` @@ -354,7 +354,7 @@ describe('createOrUpdateStagingDeployCash', () => { html_url: `https://github.com/Expensify/App/issues/${openStagingDeployCashBefore.number}`, // eslint-disable-next-line max-len body: `${baseExpectedOutput('1.0.2-1')}` - + `${lineBreak}${openCheckbox}${basePRList[5]}` + + `${openCheckbox}${basePRList[5]}` + `${lineBreak}${closedCheckbox}${basePRList[6]}` + `${lineBreak}${openCheckbox}${basePRList[7]}` + `${lineBreakDouble}${deployBlockerHeader}` From 5d19a841b6dffea161532ebb1386ccbe12f65389 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 12 Aug 2022 17:12:54 -0600 Subject: [PATCH 38/41] Update regex again to stop searching if it doesn't find '-' --- .github/libs/GithubUtils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index 6c62a121bdd1..d8728a6a37c0 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -128,7 +128,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:.*\r?\n)+)\r?\n\r?\n\*/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:-.*\r?\n)+)\r?\n\r?\n/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -155,7 +155,7 @@ class GithubUtils { * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashDeployBlockers(issue) { - let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:.*\r?\n)+)/) || []; + let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:-.*\r?\n)+)/) || []; if (deployBlockerSection.length !== 2) { return []; } From 5ce7d2485a66e6b6f21dfe73118b4b415b351feb Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 12 Aug 2022 17:13:00 -0600 Subject: [PATCH 39/41] Update spacing for double spaces --- .github/libs/GithubUtils.js | 15 ++++++---- tests/unit/createOrUpdateStagingDeployTest.js | 28 +++++++++---------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index d8728a6a37c0..efb3c09d6925 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -272,30 +272,35 @@ class GithubUtils { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; }); + issueBody += '\r\n\r\n'; } // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); - issueBody += '\r\n\r\n\r\n**Internal QA:**'; + issueBody += '\r\n\r\n\r\n**Internal QA:**\r\n'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n**Deploy Blockers:**'; + issueBody += '**Deploy Blockers:**\r\n'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x] ' : '- [ ] '; issueBody += URL; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } - issueBody += '\r\n\r\n**Deployer verifications:**'; + issueBody += '**Deployer verifications:**'; // eslint-disable-next-line max-len issueBody += `\r\n- [${isTimingDashboardChecked ? 'x' : ' '}] I checked the [App Timing Dashboard](https://graphs.expensify.com/grafana/d/yj2EobAGz/app-timing?orgId=1) and verified this release does not cause a noticeable performance regression.`; // eslint-disable-next-line max-len diff --git a/tests/unit/createOrUpdateStagingDeployTest.js b/tests/unit/createOrUpdateStagingDeployTest.js index b81238627c28..a4df7a54ace7 100644 --- a/tests/unit/createOrUpdateStagingDeployTest.js +++ b/tests/unit/createOrUpdateStagingDeployTest.js @@ -99,13 +99,13 @@ const baseIssueList = [ const baseExpectedOutput = (tag = '1.0.2-1') => `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n\r\n**This release contains changes from the following pull requests:**\r\n`; const openCheckbox = '- [ ] '; const closedCheckbox = '- [x] '; -const deployerVerificationsHeader = '\r\n**Deployer verifications:**'; +const deployerVerificationsHeader = '**Deployer verifications:**'; // eslint-disable-next-line max-len const timingDashboardVerification = 'I checked the [App Timing Dashboard](https://graphs.expensify.com/grafana/d/yj2EobAGz/app-timing?orgId=1) and verified this release does not cause a noticeable performance regression.'; // eslint-disable-next-line max-len const firebaseVerification = 'I checked [Firebase Crashlytics](https://console.firebase.google.com/u/0/project/expensify-chat/crashlytics/app/android:com.expensify.chat/issues?state=open&time=last-seven-days&tag=all) and verified that this release does not introduce any new crashes.'; const ccApplauseLeads = 'cc @Expensify/applauseleads\r\n'; -const deployBlockerHeader = '\r\n**Deploy Blockers:**'; +const deployBlockerHeader = '**Deploy Blockers:**'; const lineBreak = '\r\n'; const lineBreakDouble = '\r\n\r\n'; @@ -118,9 +118,9 @@ describe('createOrUpdateStagingDeployCash', () => { html_url: 'https://github.com/Expensify/App/issues/29', // eslint-disable-next-line max-len body: `${baseExpectedOutput('1.0.1-0')}` - + `${lineBreak}${closedCheckbox}${basePRList[0]}` + + `${closedCheckbox}${basePRList[0]}` + `${lineBreak}${closedCheckbox}${basePRList[1]}` - + `${lineBreak}${closedCheckbox}${basePRList[2]}` + + `${lineBreak}${closedCheckbox}${basePRList[2]}${lineBreak}` + `${lineBreakDouble}${deployBlockerHeader}` + `${lineBreak}${closedCheckbox}${basePRList[0]}` + `${lineBreak}${closedCheckbox}${basePRList[3]}` @@ -186,14 +186,14 @@ describe('createOrUpdateStagingDeployCash', () => { labels: [LABELS.STAGING_DEPLOY_CASH], // eslint-disable-next-line max-len body: `${baseExpectedOutput()}` - + `${lineBreak}${openCheckbox}${basePRList[5]}` + + `${openCheckbox}${basePRList[5]}` + `${lineBreak}${closedCheckbox}${basePRList[6]}` - + `${lineBreak}${openCheckbox}${basePRList[7]}` + + `${lineBreak}${openCheckbox}${basePRList[7]}${lineBreak}` + `${lineBreakDouble}${deployBlockerHeader}` + `${lineBreak}${openCheckbox}${basePRList[5]}` + `${lineBreak}${openCheckbox}${basePRList[8]}` - + `${lineBreak}${closedCheckbox}${basePRList[9]}` - + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreak}${closedCheckbox}${basePRList[9]}${lineBreak}` + + `${lineBreakDouble}${deployerVerificationsHeader}` + `${lineBreak}${closedCheckbox}${timingDashboardVerification}` + `${lineBreak}${closedCheckbox}${firebaseVerification}` + `${lineBreakDouble}${ccApplauseLeads}`, @@ -285,14 +285,14 @@ describe('createOrUpdateStagingDeployCash', () => { + `${lineBreak}${closedCheckbox}${basePRList[6]}` + `${lineBreak}${openCheckbox}${basePRList[7]}` + `${lineBreak}${openCheckbox}${basePRList[8]}` - + `${lineBreak}${openCheckbox}${basePRList[9]}` + + `${lineBreak}${openCheckbox}${basePRList[9]}${lineBreak}` + `${lineBreakDouble}${deployBlockerHeader}` + `${lineBreak}${openCheckbox}${basePRList[5]}` + `${lineBreak}${openCheckbox}${basePRList[8]}` + `${lineBreak}${closedCheckbox}${basePRList[9]}` + `${lineBreak}${openCheckbox}${basePRList[10]}` - + `${lineBreak}${openCheckbox}${basePRList[11]}` - + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreak}${openCheckbox}${basePRList[11]}${lineBreak}` + + `${lineBreakDouble}${deployerVerificationsHeader}` // Note: these will be unchecked with a new app version, and that's intentional + `${lineBreak}${openCheckbox}${timingDashboardVerification}` @@ -356,14 +356,14 @@ describe('createOrUpdateStagingDeployCash', () => { body: `${baseExpectedOutput('1.0.2-1')}` + `${openCheckbox}${basePRList[5]}` + `${lineBreak}${closedCheckbox}${basePRList[6]}` - + `${lineBreak}${openCheckbox}${basePRList[7]}` + + `${lineBreak}${openCheckbox}${basePRList[7]}${lineBreak}` + `${lineBreakDouble}${deployBlockerHeader}` + `${lineBreak}${openCheckbox}${basePRList[5]}` + `${lineBreak}${openCheckbox}${basePRList[8]}` + `${lineBreak}${closedCheckbox}${basePRList[9]}` + `${lineBreak}${openCheckbox}${baseIssueList[0]}` - + `${lineBreak}${openCheckbox}${baseIssueList[1]}` - + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreak}${openCheckbox}${baseIssueList[1]}${lineBreak}` + + `${lineBreakDouble}${deployerVerificationsHeader}` + `${lineBreak}${closedCheckbox}${timingDashboardVerification}` + `${lineBreak}${closedCheckbox}${firebaseVerification}` + `${lineBreakDouble}${ccApplauseLeads}`, From 5dfd4a42b8ac03dee73f9c7b1a31711016f55ce9 Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 12 Aug 2022 17:25:12 -0600 Subject: [PATCH 40/41] Final regex change and spacing fixes for tests --- .github/libs/GithubUtils.js | 4 +-- tests/unit/GithubUtilsTest.js | 26 +++++++++---------- tests/unit/createOrUpdateStagingDeployTest.js | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index efb3c09d6925..074b1415787a 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -128,7 +128,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:-.*\r?\n)+)\r?\n\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:-.*\r?\n)+)\r?\n\r?\n?/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -278,7 +278,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); - issueBody += '\r\n\r\n\r\n**Internal QA:**\r\n'; + issueBody += '**Internal QA:**\r\n'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); issueBody += `${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index 98b4eb0ffd62..21b33b90c963 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -379,7 +379,7 @@ describe('GithubUtils', () => { // Valid output which will be reused in the deploy blocker tests const allVerifiedExpectedOutput = `${baseExpectedOutput}` - + `${lineBreak}${closedCheckbox}${basePRList[2]}` + + `${closedCheckbox}${basePRList[2]}` + `${lineBreak}${closedCheckbox}${basePRList[0]}` + `${lineBreak}${closedCheckbox}${basePRList[1]}` + `${lineBreak}${closedCheckbox}${basePRList[5]}` @@ -391,7 +391,7 @@ describe('GithubUtils', () => { .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` - + `${lineBreak}${openCheckbox}${basePRList[2]}` + + `${openCheckbox}${basePRList[2]}` + `${lineBreak}${openCheckbox}${basePRList[0]}` + `${lineBreak}${openCheckbox}${basePRList[1]}` + `${lineBreak}${closedCheckbox}${basePRList[5]}` @@ -409,7 +409,7 @@ describe('GithubUtils', () => { .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` - + `${lineBreak}${openCheckbox}${basePRList[2]}` + + `${openCheckbox}${basePRList[2]}` + `${lineBreak}${closedCheckbox}${basePRList[0]}` + `${lineBreak}${openCheckbox}${basePRList[1]}` + `${lineBreak}${closedCheckbox}${basePRList[5]}` @@ -443,7 +443,7 @@ describe('GithubUtils', () => { + `${lineBreak}${deployBlockerHeader}` + `${lineBreak}${openCheckbox}${baseDeployBlockerList[0]}` + `${lineBreak}${openCheckbox}${baseDeployBlockerList[1]}` - + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreakDouble}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + `${lineBreak}${openCheckbox}${firebaseVerification}${lineBreak}` + `${lineBreak}${ccApplauseLeads}`, @@ -459,7 +459,7 @@ describe('GithubUtils', () => { + `${lineBreak}${deployBlockerHeader}` + `${lineBreak}${closedCheckbox}${baseDeployBlockerList[0]}` + `${lineBreak}${openCheckbox}${baseDeployBlockerList[1]}` - + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreakDouble}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + `${lineBreak}${openCheckbox}${firebaseVerification}` + `${lineBreakDouble}${ccApplauseLeads}`, @@ -472,7 +472,7 @@ describe('GithubUtils', () => { .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` - + `${lineBreak}${closedCheckbox}${basePRList[2]}` + + `${closedCheckbox}${basePRList[2]}` + `${lineBreak}${closedCheckbox}${basePRList[0]}` + `${lineBreak}${closedCheckbox}${basePRList[1]}` + `${lineBreak}${closedCheckbox}${basePRList[5]}` @@ -480,7 +480,7 @@ describe('GithubUtils', () => { + `${lineBreakDouble}${deployBlockerHeader}` + `${lineBreak}${closedCheckbox}${baseDeployBlockerList[0]}` + `${lineBreak}${closedCheckbox}${baseDeployBlockerList[1]}` - + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreakDouble}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + `${lineBreak}${openCheckbox}${firebaseVerification}` + `${lineBreakDouble}${ccApplauseLeads}`, @@ -493,15 +493,15 @@ describe('GithubUtils', () => { .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` - + `${lineBreak}${openCheckbox}${basePRList[2]}` + + `${openCheckbox}${basePRList[2]}` + `${lineBreak}${openCheckbox}${basePRList[0]}` + `${lineBreak}${openCheckbox}${basePRList[1]}` + `${lineBreak}${closedCheckbox}${basePRList[5]}` + `${lineBreak}${closedCheckbox}${basePRList[6]}` - + `${lineBreakDouble}${internalQAHeader}` + + `${lineBreak}${internalQAHeader}` + `${lineBreak}${openCheckbox}${internalQAPRList[0]}${assignOctocatHubot}` + `${lineBreak}${openCheckbox}${internalQAPRList[1]}${assignOctocatHubot}` - + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreakDouble}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + `${lineBreak}${openCheckbox}${firebaseVerification}` + `${lineBreakDouble}${ccApplauseLeads}`, @@ -514,15 +514,15 @@ describe('GithubUtils', () => { .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` - + `${lineBreak}${openCheckbox}${basePRList[2]}` + + `${openCheckbox}${basePRList[2]}` + `${lineBreak}${openCheckbox}${basePRList[0]}` + `${lineBreak}${openCheckbox}${basePRList[1]}` + `${lineBreak}${closedCheckbox}${basePRList[5]}` + `${lineBreak}${closedCheckbox}${basePRList[6]}` - + `${lineBreakDouble}${internalQAHeader}` + + `${lineBreak}${internalQAHeader}` + `${lineBreak}${closedCheckbox}${internalQAPRList[0]}${assignOctocatHubot}` + `${lineBreak}${openCheckbox}${internalQAPRList[1]}${assignOctocatHubot}` - + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreakDouble}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + `${lineBreak}${openCheckbox}${firebaseVerification}` + `${lineBreakDouble}${ccApplauseLeads}`, diff --git a/tests/unit/createOrUpdateStagingDeployTest.js b/tests/unit/createOrUpdateStagingDeployTest.js index a4df7a54ace7..309076b6381f 100644 --- a/tests/unit/createOrUpdateStagingDeployTest.js +++ b/tests/unit/createOrUpdateStagingDeployTest.js @@ -169,7 +169,7 @@ describe('createOrUpdateStagingDeployCash', () => { body: `${baseExpectedOutput()}` + `${openCheckbox}${basePRList[5]}` + `${lineBreak}${openCheckbox}${basePRList[6]}` - + `${lineBreak}${openCheckbox}${basePRList[7]}` + + `${lineBreak}${openCheckbox}${basePRList[7]}${lineBreak}` + `${lineBreakDouble}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + `${lineBreak}${openCheckbox}${firebaseVerification}` From a98fcce04132df4c2cdc8f2a3ab83720ef14cf1a Mon Sep 17 00:00:00 2001 From: Brandon Stites Date: Fri, 12 Aug 2022 17:35:40 -0600 Subject: [PATCH 41/41] Build github actions --- .../javascript/awaitStagingDeploys/index.js | 19 ++++++++++++------- .../javascript/checkDeployBlockers/index.js | 19 ++++++++++++------- .../createOrUpdateStagingDeploy/index.js | 19 ++++++++++++------- .../javascript/getPullRequestDetails/index.js | 19 ++++++++++++------- .../javascript/getReleaseBody/index.js | 19 ++++++++++++------- .../isPullRequestMergeable/index.js | 19 ++++++++++++------- .../javascript/isStagingDeployLocked/index.js | 19 ++++++++++++------- .../markPullRequestsAsDeployed/index.js | 19 ++++++++++++------- .../reopenIssueWithComment/index.js | 19 ++++++++++++------- .../triggerWorkflowAndWait/index.js | 19 ++++++++++++------- .../javascript/verifySignedCommits/index.js | 19 ++++++++++++------- 11 files changed, 132 insertions(+), 77 deletions(-) diff --git a/.github/actions/javascript/awaitStagingDeploys/index.js b/.github/actions/javascript/awaitStagingDeploys/index.js index 6f97e62f55a9..f82c783f551b 100644 --- a/.github/actions/javascript/awaitStagingDeploys/index.js +++ b/.github/actions/javascript/awaitStagingDeploys/index.js @@ -245,7 +245,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:-.*\r?\n)+)\r?\n\r?\n?/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -272,7 +272,7 @@ class GithubUtils { * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashDeployBlockers(issue) { - let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:.*\r?\n)+)/) || []; + let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:-.*\r?\n)+)/) || []; if (deployBlockerSection.length !== 2) { return []; } @@ -389,30 +389,35 @@ class GithubUtils { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; }); + issueBody += '\r\n\r\n'; } // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); - issueBody += '\r\n\r\n\r\n**Internal QA:**'; + issueBody += '**Internal QA:**\r\n'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n**Deploy Blockers:**'; + issueBody += '**Deploy Blockers:**\r\n'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x] ' : '- [ ] '; issueBody += URL; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } - issueBody += '\r\n\r\n**Deployer verifications:**'; + issueBody += '**Deployer verifications:**'; // eslint-disable-next-line max-len issueBody += `\r\n- [${isTimingDashboardChecked ? 'x' : ' '}] I checked the [App Timing Dashboard](https://graphs.expensify.com/grafana/d/yj2EobAGz/app-timing?orgId=1) and verified this release does not cause a noticeable performance regression.`; // eslint-disable-next-line max-len diff --git a/.github/actions/javascript/checkDeployBlockers/index.js b/.github/actions/javascript/checkDeployBlockers/index.js index be2610bbdea4..4631ac4849c9 100644 --- a/.github/actions/javascript/checkDeployBlockers/index.js +++ b/.github/actions/javascript/checkDeployBlockers/index.js @@ -215,7 +215,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:-.*\r?\n)+)\r?\n\r?\n?/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -242,7 +242,7 @@ class GithubUtils { * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashDeployBlockers(issue) { - let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:.*\r?\n)+)/) || []; + let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:-.*\r?\n)+)/) || []; if (deployBlockerSection.length !== 2) { return []; } @@ -359,30 +359,35 @@ class GithubUtils { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; }); + issueBody += '\r\n\r\n'; } // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); - issueBody += '\r\n\r\n\r\n**Internal QA:**'; + issueBody += '**Internal QA:**\r\n'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n**Deploy Blockers:**'; + issueBody += '**Deploy Blockers:**\r\n'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x] ' : '- [ ] '; issueBody += URL; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } - issueBody += '\r\n\r\n**Deployer verifications:**'; + issueBody += '**Deployer verifications:**'; // eslint-disable-next-line max-len issueBody += `\r\n- [${isTimingDashboardChecked ? 'x' : ' '}] I checked the [App Timing Dashboard](https://graphs.expensify.com/grafana/d/yj2EobAGz/app-timing?orgId=1) and verified this release does not cause a noticeable performance regression.`; // eslint-disable-next-line max-len diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index af4bd9a9804d..3645718ec9b6 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -442,7 +442,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:-.*\r?\n)+)\r?\n\r?\n?/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -469,7 +469,7 @@ class GithubUtils { * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashDeployBlockers(issue) { - let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:.*\r?\n)+)/) || []; + let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:-.*\r?\n)+)/) || []; if (deployBlockerSection.length !== 2) { return []; } @@ -586,30 +586,35 @@ class GithubUtils { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; }); + issueBody += '\r\n\r\n'; } // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); - issueBody += '\r\n\r\n\r\n**Internal QA:**'; + issueBody += '**Internal QA:**\r\n'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n**Deploy Blockers:**'; + issueBody += '**Deploy Blockers:**\r\n'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x] ' : '- [ ] '; issueBody += URL; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } - issueBody += '\r\n\r\n**Deployer verifications:**'; + issueBody += '**Deployer verifications:**'; // eslint-disable-next-line max-len issueBody += `\r\n- [${isTimingDashboardChecked ? 'x' : ' '}] I checked the [App Timing Dashboard](https://graphs.expensify.com/grafana/d/yj2EobAGz/app-timing?orgId=1) and verified this release does not cause a noticeable performance regression.`; // eslint-disable-next-line max-len diff --git a/.github/actions/javascript/getPullRequestDetails/index.js b/.github/actions/javascript/getPullRequestDetails/index.js index 78fe79248d2d..2a5c6b18c6fe 100644 --- a/.github/actions/javascript/getPullRequestDetails/index.js +++ b/.github/actions/javascript/getPullRequestDetails/index.js @@ -286,7 +286,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:-.*\r?\n)+)\r?\n\r?\n?/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -313,7 +313,7 @@ class GithubUtils { * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashDeployBlockers(issue) { - let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:.*\r?\n)+)/) || []; + let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:-.*\r?\n)+)/) || []; if (deployBlockerSection.length !== 2) { return []; } @@ -430,30 +430,35 @@ class GithubUtils { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; }); + issueBody += '\r\n\r\n'; } // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); - issueBody += '\r\n\r\n\r\n**Internal QA:**'; + issueBody += '**Internal QA:**\r\n'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n**Deploy Blockers:**'; + issueBody += '**Deploy Blockers:**\r\n'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x] ' : '- [ ] '; issueBody += URL; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } - issueBody += '\r\n\r\n**Deployer verifications:**'; + issueBody += '**Deployer verifications:**'; // eslint-disable-next-line max-len issueBody += `\r\n- [${isTimingDashboardChecked ? 'x' : ' '}] I checked the [App Timing Dashboard](https://graphs.expensify.com/grafana/d/yj2EobAGz/app-timing?orgId=1) and verified this release does not cause a noticeable performance regression.`; // eslint-disable-next-line max-len diff --git a/.github/actions/javascript/getReleaseBody/index.js b/.github/actions/javascript/getReleaseBody/index.js index dca1ac86ca27..37960a660617 100644 --- a/.github/actions/javascript/getReleaseBody/index.js +++ b/.github/actions/javascript/getReleaseBody/index.js @@ -204,7 +204,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:-.*\r?\n)+)\r?\n\r?\n?/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -231,7 +231,7 @@ class GithubUtils { * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashDeployBlockers(issue) { - let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:.*\r?\n)+)/) || []; + let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:-.*\r?\n)+)/) || []; if (deployBlockerSection.length !== 2) { return []; } @@ -348,30 +348,35 @@ class GithubUtils { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; }); + issueBody += '\r\n\r\n'; } // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); - issueBody += '\r\n\r\n\r\n**Internal QA:**'; + issueBody += '**Internal QA:**\r\n'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n**Deploy Blockers:**'; + issueBody += '**Deploy Blockers:**\r\n'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x] ' : '- [ ] '; issueBody += URL; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } - issueBody += '\r\n\r\n**Deployer verifications:**'; + issueBody += '**Deployer verifications:**'; // eslint-disable-next-line max-len issueBody += `\r\n- [${isTimingDashboardChecked ? 'x' : ' '}] I checked the [App Timing Dashboard](https://graphs.expensify.com/grafana/d/yj2EobAGz/app-timing?orgId=1) and verified this release does not cause a noticeable performance regression.`; // eslint-disable-next-line max-len diff --git a/.github/actions/javascript/isPullRequestMergeable/index.js b/.github/actions/javascript/isPullRequestMergeable/index.js index e77d1f55e898..62196c4d9bce 100644 --- a/.github/actions/javascript/isPullRequestMergeable/index.js +++ b/.github/actions/javascript/isPullRequestMergeable/index.js @@ -236,7 +236,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:-.*\r?\n)+)\r?\n\r?\n?/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -263,7 +263,7 @@ class GithubUtils { * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashDeployBlockers(issue) { - let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:.*\r?\n)+)/) || []; + let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:-.*\r?\n)+)/) || []; if (deployBlockerSection.length !== 2) { return []; } @@ -380,30 +380,35 @@ class GithubUtils { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; }); + issueBody += '\r\n\r\n'; } // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); - issueBody += '\r\n\r\n\r\n**Internal QA:**'; + issueBody += '**Internal QA:**\r\n'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n**Deploy Blockers:**'; + issueBody += '**Deploy Blockers:**\r\n'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x] ' : '- [ ] '; issueBody += URL; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } - issueBody += '\r\n\r\n**Deployer verifications:**'; + issueBody += '**Deployer verifications:**'; // eslint-disable-next-line max-len issueBody += `\r\n- [${isTimingDashboardChecked ? 'x' : ' '}] I checked the [App Timing Dashboard](https://graphs.expensify.com/grafana/d/yj2EobAGz/app-timing?orgId=1) and verified this release does not cause a noticeable performance regression.`; // eslint-disable-next-line max-len diff --git a/.github/actions/javascript/isStagingDeployLocked/index.js b/.github/actions/javascript/isStagingDeployLocked/index.js index bb6fb9b2eca7..bf7198f43e44 100644 --- a/.github/actions/javascript/isStagingDeployLocked/index.js +++ b/.github/actions/javascript/isStagingDeployLocked/index.js @@ -168,7 +168,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:-.*\r?\n)+)\r?\n\r?\n?/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -195,7 +195,7 @@ class GithubUtils { * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashDeployBlockers(issue) { - let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:.*\r?\n)+)/) || []; + let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:-.*\r?\n)+)/) || []; if (deployBlockerSection.length !== 2) { return []; } @@ -312,30 +312,35 @@ class GithubUtils { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; }); + issueBody += '\r\n\r\n'; } // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); - issueBody += '\r\n\r\n\r\n**Internal QA:**'; + issueBody += '**Internal QA:**\r\n'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n**Deploy Blockers:**'; + issueBody += '**Deploy Blockers:**\r\n'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x] ' : '- [ ] '; issueBody += URL; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } - issueBody += '\r\n\r\n**Deployer verifications:**'; + issueBody += '**Deployer verifications:**'; // eslint-disable-next-line max-len issueBody += `\r\n- [${isTimingDashboardChecked ? 'x' : ' '}] I checked the [App Timing Dashboard](https://graphs.expensify.com/grafana/d/yj2EobAGz/app-timing?orgId=1) and verified this release does not cause a noticeable performance regression.`; // eslint-disable-next-line max-len diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/index.js b/.github/actions/javascript/markPullRequestsAsDeployed/index.js index 9b591661bbc2..518e95f7f51f 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/index.js +++ b/.github/actions/javascript/markPullRequestsAsDeployed/index.js @@ -337,7 +337,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:-.*\r?\n)+)\r?\n\r?\n?/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -364,7 +364,7 @@ class GithubUtils { * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashDeployBlockers(issue) { - let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:.*\r?\n)+)/) || []; + let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:-.*\r?\n)+)/) || []; if (deployBlockerSection.length !== 2) { return []; } @@ -481,30 +481,35 @@ class GithubUtils { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; }); + issueBody += '\r\n\r\n'; } // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); - issueBody += '\r\n\r\n\r\n**Internal QA:**'; + issueBody += '**Internal QA:**\r\n'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n**Deploy Blockers:**'; + issueBody += '**Deploy Blockers:**\r\n'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x] ' : '- [ ] '; issueBody += URL; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } - issueBody += '\r\n\r\n**Deployer verifications:**'; + issueBody += '**Deployer verifications:**'; // eslint-disable-next-line max-len issueBody += `\r\n- [${isTimingDashboardChecked ? 'x' : ' '}] I checked the [App Timing Dashboard](https://graphs.expensify.com/grafana/d/yj2EobAGz/app-timing?orgId=1) and verified this release does not cause a noticeable performance regression.`; // eslint-disable-next-line max-len diff --git a/.github/actions/javascript/reopenIssueWithComment/index.js b/.github/actions/javascript/reopenIssueWithComment/index.js index af0b6b8c22fb..2a2eb9954bd9 100644 --- a/.github/actions/javascript/reopenIssueWithComment/index.js +++ b/.github/actions/javascript/reopenIssueWithComment/index.js @@ -179,7 +179,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:-.*\r?\n)+)\r?\n\r?\n?/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -206,7 +206,7 @@ class GithubUtils { * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashDeployBlockers(issue) { - let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:.*\r?\n)+)/) || []; + let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:-.*\r?\n)+)/) || []; if (deployBlockerSection.length !== 2) { return []; } @@ -323,30 +323,35 @@ class GithubUtils { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; }); + issueBody += '\r\n\r\n'; } // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); - issueBody += '\r\n\r\n\r\n**Internal QA:**'; + issueBody += '**Internal QA:**\r\n'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n**Deploy Blockers:**'; + issueBody += '**Deploy Blockers:**\r\n'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x] ' : '- [ ] '; issueBody += URL; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } - issueBody += '\r\n\r\n**Deployer verifications:**'; + issueBody += '**Deployer verifications:**'; // eslint-disable-next-line max-len issueBody += `\r\n- [${isTimingDashboardChecked ? 'x' : ' '}] I checked the [App Timing Dashboard](https://graphs.expensify.com/grafana/d/yj2EobAGz/app-timing?orgId=1) and verified this release does not cause a noticeable performance regression.`; // eslint-disable-next-line max-len diff --git a/.github/actions/javascript/triggerWorkflowAndWait/index.js b/.github/actions/javascript/triggerWorkflowAndWait/index.js index fbf1dae986fe..4608f036e407 100644 --- a/.github/actions/javascript/triggerWorkflowAndWait/index.js +++ b/.github/actions/javascript/triggerWorkflowAndWait/index.js @@ -348,7 +348,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:-.*\r?\n)+)\r?\n\r?\n?/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -375,7 +375,7 @@ class GithubUtils { * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashDeployBlockers(issue) { - let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:.*\r?\n)+)/) || []; + let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:-.*\r?\n)+)/) || []; if (deployBlockerSection.length !== 2) { return []; } @@ -492,30 +492,35 @@ class GithubUtils { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; }); + issueBody += '\r\n\r\n'; } // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); - issueBody += '\r\n\r\n\r\n**Internal QA:**'; + issueBody += '**Internal QA:**\r\n'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n**Deploy Blockers:**'; + issueBody += '**Deploy Blockers:**\r\n'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x] ' : '- [ ] '; issueBody += URL; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } - issueBody += '\r\n\r\n**Deployer verifications:**'; + issueBody += '**Deployer verifications:**'; // eslint-disable-next-line max-len issueBody += `\r\n- [${isTimingDashboardChecked ? 'x' : ' '}] I checked the [App Timing Dashboard](https://graphs.expensify.com/grafana/d/yj2EobAGz/app-timing?orgId=1) and verified this release does not cause a noticeable performance regression.`; // eslint-disable-next-line max-len diff --git a/.github/actions/javascript/verifySignedCommits/index.js b/.github/actions/javascript/verifySignedCommits/index.js index 97e7200245b9..190773d4d92f 100644 --- a/.github/actions/javascript/verifySignedCommits/index.js +++ b/.github/actions/javascript/verifySignedCommits/index.js @@ -168,7 +168,7 @@ class GithubUtils { * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] */ static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n\r?\n((?:.*\r?\n)+)\r?\n/) || []; + let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:-.*\r?\n)+)\r?\n\r?\n?/) || []; if (PRListSection.length !== 2) { // No PRs, return an empty array console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); @@ -195,7 +195,7 @@ class GithubUtils { * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] */ static getStagingDeployCashDeployBlockers(issue) { - let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:.*\r?\n)+)/) || []; + let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:-.*\r?\n)+)/) || []; if (deployBlockerSection.length !== 2) { return []; } @@ -312,30 +312,35 @@ class GithubUtils { issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; issueBody += ` ${URL}\r\n`; }); + issueBody += '\r\n\r\n'; } // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); - issueBody += '\r\n\r\n\r\n**Internal QA:**'; + issueBody += '**Internal QA:**\r\n'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n\r\n**Deploy Blockers:**'; + issueBody += '**Deploy Blockers:**\r\n'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n- [x] ' : '\r\n- [ ] '; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x] ' : '- [ ] '; issueBody += URL; + issueBody += '\r\n'; }); + issueBody += '\r\n\r\n'; } - issueBody += '\r\n\r\n**Deployer verifications:**'; + issueBody += '**Deployer verifications:**'; // eslint-disable-next-line max-len issueBody += `\r\n- [${isTimingDashboardChecked ? 'x' : ' '}] I checked the [App Timing Dashboard](https://graphs.expensify.com/grafana/d/yj2EobAGz/app-timing?orgId=1) and verified this release does not cause a noticeable performance regression.`; // eslint-disable-next-line max-len