diff --git a/.github/actions/checkDeployBlockers/index.js b/.github/actions/checkDeployBlockers/index.js index ea3f5376023d..54b1f2e550e9 100644 --- a/.github/actions/checkDeployBlockers/index.js +++ b/.github/actions/checkDeployBlockers/index.js @@ -206,7 +206,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+-\s.*\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...'); @@ -214,7 +214,7 @@ class GithubUtils { } PRListSection = PRListSection[1]; const unverifiedPRs = _.map( - [...PRListSection.matchAll(new RegExp(`- \\[ ] (${PULL_REQUEST_REGEX.source})`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[ \\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getPullRequestNumberFromURL(match[1]), @@ -222,7 +222,7 @@ class GithubUtils { }), ); const verifiedPRs = _.map( - [...PRListSection.matchAll(new RegExp(`- \\[x] (${PULL_REQUEST_REGEX.source})`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[x\\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getPullRequestNumberFromURL(match[1]), @@ -250,7 +250,7 @@ class GithubUtils { } deployBlockerSection = deployBlockerSection[1]; const unresolvedDeployBlockers = _.map( - [...deployBlockerSection.matchAll(new RegExp(`- \\[ ] (${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))], + [...deployBlockerSection.matchAll(new RegExp(`- (${ISSUE_OR_PULL_REQUEST_REGEX.source})\\s+- \\[ \\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getIssueOrPullRequestNumberFromURL(match[1]), @@ -258,7 +258,7 @@ class GithubUtils { }), ); const resolvedDeployBlockers = _.map( - [...deployBlockerSection.matchAll(new RegExp(`- \\[x] (${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))], + [...deployBlockerSection.matchAll(new RegExp(`- (${ISSUE_OR_PULL_REQUEST_REGEX.source})\\s+- \\[x\\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getIssueOrPullRequestNumberFromURL(match[1]), @@ -277,6 +277,7 @@ class GithubUtils { * @param {String} tag * @param {Array} PRList - The list of PR URLs which are included in this StagingDeployCash * @param {Array} [verifiedPRList] - The list of PR URLs which have passed QA. + * @param {Array} [accessablePRList] - The list of PR URLs which have passed the accessability check. * @param {Array} [deployBlockers] - The list of DeployBlocker URLs. * @param {Array} [resolvedDeployBlockers] - The list of DeployBlockers URLs which have been resolved. * @returns {Promise} @@ -285,6 +286,7 @@ class GithubUtils { tag, PRList, verifiedPRList = [], + accessablePRList = [], deployBlockers = [], resolvedDeployBlockers = [], ) { @@ -311,23 +313,24 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; + issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += _.contains(verifiedPRList, URL) ? '- [x]' : '- [ ]'; - issueBody += ` ${URL}\r\n`; + issueBody += `\r\n\r\n- ${URL}`; + issueBody += _.contains(verifiedPRList, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; + issueBody += _.contains(accessablePRList, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; }); } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n**Deploy Blockers:**\r\n'; + issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x]' : '- [ ]'; - issueBody += ` ${URL}\r\n`; + issueBody += `\r\n\r\n- ${URL}`; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; }); } - issueBody += '\r\ncc @Expensify/applauseleads\r\n'; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) .catch(err => console.warn( diff --git a/.github/actions/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js b/.github/actions/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js index 10b2decd2b81..a1ba2cfa5d32 100644 --- a/.github/actions/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js +++ b/.github/actions/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js @@ -101,8 +101,9 @@ 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 will be preserved. + // and the original value of isVerified and isAccessible will be preserved. isVerified: false, + isAccessible: false, }))), false, item => item.number, @@ -124,6 +125,7 @@ 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'), ); diff --git a/.github/actions/createOrUpdateStagingDeploy/index.js b/.github/actions/createOrUpdateStagingDeploy/index.js index d89e30e1b3cb..c4e72f37b810 100644 --- a/.github/actions/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/createOrUpdateStagingDeploy/index.js @@ -111,8 +111,9 @@ 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 will be preserved. + // and the original value of isVerified and isAccessible will be preserved. isVerified: false, + isAccessible: false, }))), false, item => item.number, @@ -134,6 +135,7 @@ 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'), ); @@ -333,7 +335,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+-\s.*\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...'); @@ -341,7 +343,7 @@ class GithubUtils { } PRListSection = PRListSection[1]; const unverifiedPRs = _.map( - [...PRListSection.matchAll(new RegExp(`- \\[ ] (${PULL_REQUEST_REGEX.source})`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[ \\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getPullRequestNumberFromURL(match[1]), @@ -349,7 +351,7 @@ class GithubUtils { }), ); const verifiedPRs = _.map( - [...PRListSection.matchAll(new RegExp(`- \\[x] (${PULL_REQUEST_REGEX.source})`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[x\\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getPullRequestNumberFromURL(match[1]), @@ -377,7 +379,7 @@ class GithubUtils { } deployBlockerSection = deployBlockerSection[1]; const unresolvedDeployBlockers = _.map( - [...deployBlockerSection.matchAll(new RegExp(`- \\[ ] (${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))], + [...deployBlockerSection.matchAll(new RegExp(`- (${ISSUE_OR_PULL_REQUEST_REGEX.source})\\s+- \\[ \\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getIssueOrPullRequestNumberFromURL(match[1]), @@ -385,7 +387,7 @@ class GithubUtils { }), ); const resolvedDeployBlockers = _.map( - [...deployBlockerSection.matchAll(new RegExp(`- \\[x] (${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))], + [...deployBlockerSection.matchAll(new RegExp(`- (${ISSUE_OR_PULL_REQUEST_REGEX.source})\\s+- \\[x\\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getIssueOrPullRequestNumberFromURL(match[1]), @@ -404,6 +406,7 @@ class GithubUtils { * @param {String} tag * @param {Array} PRList - The list of PR URLs which are included in this StagingDeployCash * @param {Array} [verifiedPRList] - The list of PR URLs which have passed QA. + * @param {Array} [accessablePRList] - The list of PR URLs which have passed the accessability check. * @param {Array} [deployBlockers] - The list of DeployBlocker URLs. * @param {Array} [resolvedDeployBlockers] - The list of DeployBlockers URLs which have been resolved. * @returns {Promise} @@ -412,6 +415,7 @@ class GithubUtils { tag, PRList, verifiedPRList = [], + accessablePRList = [], deployBlockers = [], resolvedDeployBlockers = [], ) { @@ -438,23 +442,24 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; + issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += _.contains(verifiedPRList, URL) ? '- [x]' : '- [ ]'; - issueBody += ` ${URL}\r\n`; + issueBody += `\r\n\r\n- ${URL}`; + issueBody += _.contains(verifiedPRList, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; + issueBody += _.contains(accessablePRList, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; }); } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n**Deploy Blockers:**\r\n'; + issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x]' : '- [ ]'; - issueBody += ` ${URL}\r\n`; + issueBody += `\r\n\r\n- ${URL}`; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; }); } - issueBody += '\r\ncc @Expensify/applauseleads\r\n'; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) .catch(err => console.warn( diff --git a/.github/actions/getPullRequestDetails/index.js b/.github/actions/getPullRequestDetails/index.js index 9ab14cf2a1cc..1af0f147c1c3 100644 --- a/.github/actions/getPullRequestDetails/index.js +++ b/.github/actions/getPullRequestDetails/index.js @@ -259,7 +259,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+-\s.*\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...'); @@ -267,7 +267,7 @@ class GithubUtils { } PRListSection = PRListSection[1]; const unverifiedPRs = _.map( - [...PRListSection.matchAll(new RegExp(`- \\[ ] (${PULL_REQUEST_REGEX.source})`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[ \\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getPullRequestNumberFromURL(match[1]), @@ -275,7 +275,7 @@ class GithubUtils { }), ); const verifiedPRs = _.map( - [...PRListSection.matchAll(new RegExp(`- \\[x] (${PULL_REQUEST_REGEX.source})`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[x\\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getPullRequestNumberFromURL(match[1]), @@ -303,7 +303,7 @@ class GithubUtils { } deployBlockerSection = deployBlockerSection[1]; const unresolvedDeployBlockers = _.map( - [...deployBlockerSection.matchAll(new RegExp(`- \\[ ] (${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))], + [...deployBlockerSection.matchAll(new RegExp(`- (${ISSUE_OR_PULL_REQUEST_REGEX.source})\\s+- \\[ \\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getIssueOrPullRequestNumberFromURL(match[1]), @@ -311,7 +311,7 @@ class GithubUtils { }), ); const resolvedDeployBlockers = _.map( - [...deployBlockerSection.matchAll(new RegExp(`- \\[x] (${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))], + [...deployBlockerSection.matchAll(new RegExp(`- (${ISSUE_OR_PULL_REQUEST_REGEX.source})\\s+- \\[x\\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getIssueOrPullRequestNumberFromURL(match[1]), @@ -330,6 +330,7 @@ class GithubUtils { * @param {String} tag * @param {Array} PRList - The list of PR URLs which are included in this StagingDeployCash * @param {Array} [verifiedPRList] - The list of PR URLs which have passed QA. + * @param {Array} [accessablePRList] - The list of PR URLs which have passed the accessability check. * @param {Array} [deployBlockers] - The list of DeployBlocker URLs. * @param {Array} [resolvedDeployBlockers] - The list of DeployBlockers URLs which have been resolved. * @returns {Promise} @@ -338,6 +339,7 @@ class GithubUtils { tag, PRList, verifiedPRList = [], + accessablePRList = [], deployBlockers = [], resolvedDeployBlockers = [], ) { @@ -364,23 +366,24 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; + issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += _.contains(verifiedPRList, URL) ? '- [x]' : '- [ ]'; - issueBody += ` ${URL}\r\n`; + issueBody += `\r\n\r\n- ${URL}`; + issueBody += _.contains(verifiedPRList, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; + issueBody += _.contains(accessablePRList, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; }); } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n**Deploy Blockers:**\r\n'; + issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x]' : '- [ ]'; - issueBody += ` ${URL}\r\n`; + issueBody += `\r\n\r\n- ${URL}`; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; }); } - issueBody += '\r\ncc @Expensify/applauseleads\r\n'; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) .catch(err => console.warn( diff --git a/.github/actions/getReleaseBody/index.js b/.github/actions/getReleaseBody/index.js index 2ce1b053a128..32502f989788 100644 --- a/.github/actions/getReleaseBody/index.js +++ b/.github/actions/getReleaseBody/index.js @@ -177,7 +177,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+-\s.*\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...'); @@ -185,7 +185,7 @@ class GithubUtils { } PRListSection = PRListSection[1]; const unverifiedPRs = _.map( - [...PRListSection.matchAll(new RegExp(`- \\[ ] (${PULL_REQUEST_REGEX.source})`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[ \\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getPullRequestNumberFromURL(match[1]), @@ -193,7 +193,7 @@ class GithubUtils { }), ); const verifiedPRs = _.map( - [...PRListSection.matchAll(new RegExp(`- \\[x] (${PULL_REQUEST_REGEX.source})`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[x\\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getPullRequestNumberFromURL(match[1]), @@ -221,7 +221,7 @@ class GithubUtils { } deployBlockerSection = deployBlockerSection[1]; const unresolvedDeployBlockers = _.map( - [...deployBlockerSection.matchAll(new RegExp(`- \\[ ] (${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))], + [...deployBlockerSection.matchAll(new RegExp(`- (${ISSUE_OR_PULL_REQUEST_REGEX.source})\\s+- \\[ \\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getIssueOrPullRequestNumberFromURL(match[1]), @@ -229,7 +229,7 @@ class GithubUtils { }), ); const resolvedDeployBlockers = _.map( - [...deployBlockerSection.matchAll(new RegExp(`- \\[x] (${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))], + [...deployBlockerSection.matchAll(new RegExp(`- (${ISSUE_OR_PULL_REQUEST_REGEX.source})\\s+- \\[x\\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getIssueOrPullRequestNumberFromURL(match[1]), @@ -248,6 +248,7 @@ class GithubUtils { * @param {String} tag * @param {Array} PRList - The list of PR URLs which are included in this StagingDeployCash * @param {Array} [verifiedPRList] - The list of PR URLs which have passed QA. + * @param {Array} [accessablePRList] - The list of PR URLs which have passed the accessability check. * @param {Array} [deployBlockers] - The list of DeployBlocker URLs. * @param {Array} [resolvedDeployBlockers] - The list of DeployBlockers URLs which have been resolved. * @returns {Promise} @@ -256,6 +257,7 @@ class GithubUtils { tag, PRList, verifiedPRList = [], + accessablePRList = [], deployBlockers = [], resolvedDeployBlockers = [], ) { @@ -282,23 +284,24 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; + issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += _.contains(verifiedPRList, URL) ? '- [x]' : '- [ ]'; - issueBody += ` ${URL}\r\n`; + issueBody += `\r\n\r\n- ${URL}`; + issueBody += _.contains(verifiedPRList, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; + issueBody += _.contains(accessablePRList, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; }); } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n**Deploy Blockers:**\r\n'; + issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x]' : '- [ ]'; - issueBody += ` ${URL}\r\n`; + issueBody += `\r\n\r\n- ${URL}`; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; }); } - issueBody += '\r\ncc @Expensify/applauseleads\r\n'; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) .catch(err => console.warn( diff --git a/.github/actions/isPullRequestMergeable/index.js b/.github/actions/isPullRequestMergeable/index.js index 1fd72ab15478..0debda100368 100644 --- a/.github/actions/isPullRequestMergeable/index.js +++ b/.github/actions/isPullRequestMergeable/index.js @@ -180,7 +180,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+-\s.*\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...'); @@ -188,7 +188,7 @@ class GithubUtils { } PRListSection = PRListSection[1]; const unverifiedPRs = _.map( - [...PRListSection.matchAll(new RegExp(`- \\[ ] (${PULL_REQUEST_REGEX.source})`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[ \\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getPullRequestNumberFromURL(match[1]), @@ -196,7 +196,7 @@ class GithubUtils { }), ); const verifiedPRs = _.map( - [...PRListSection.matchAll(new RegExp(`- \\[x] (${PULL_REQUEST_REGEX.source})`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[x\\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getPullRequestNumberFromURL(match[1]), @@ -224,7 +224,7 @@ class GithubUtils { } deployBlockerSection = deployBlockerSection[1]; const unresolvedDeployBlockers = _.map( - [...deployBlockerSection.matchAll(new RegExp(`- \\[ ] (${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))], + [...deployBlockerSection.matchAll(new RegExp(`- (${ISSUE_OR_PULL_REQUEST_REGEX.source})\\s+- \\[ \\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getIssueOrPullRequestNumberFromURL(match[1]), @@ -232,7 +232,7 @@ class GithubUtils { }), ); const resolvedDeployBlockers = _.map( - [...deployBlockerSection.matchAll(new RegExp(`- \\[x] (${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))], + [...deployBlockerSection.matchAll(new RegExp(`- (${ISSUE_OR_PULL_REQUEST_REGEX.source})\\s+- \\[x\\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getIssueOrPullRequestNumberFromURL(match[1]), @@ -251,6 +251,7 @@ class GithubUtils { * @param {String} tag * @param {Array} PRList - The list of PR URLs which are included in this StagingDeployCash * @param {Array} [verifiedPRList] - The list of PR URLs which have passed QA. + * @param {Array} [accessablePRList] - The list of PR URLs which have passed the accessability check. * @param {Array} [deployBlockers] - The list of DeployBlocker URLs. * @param {Array} [resolvedDeployBlockers] - The list of DeployBlockers URLs which have been resolved. * @returns {Promise} @@ -259,6 +260,7 @@ class GithubUtils { tag, PRList, verifiedPRList = [], + accessablePRList = [], deployBlockers = [], resolvedDeployBlockers = [], ) { @@ -285,23 +287,24 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; + issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += _.contains(verifiedPRList, URL) ? '- [x]' : '- [ ]'; - issueBody += ` ${URL}\r\n`; + issueBody += `\r\n\r\n- ${URL}`; + issueBody += _.contains(verifiedPRList, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; + issueBody += _.contains(accessablePRList, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; }); } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n**Deploy Blockers:**\r\n'; + issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x]' : '- [ ]'; - issueBody += ` ${URL}\r\n`; + issueBody += `\r\n\r\n- ${URL}`; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; }); } - issueBody += '\r\ncc @Expensify/applauseleads\r\n'; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) .catch(err => console.warn( diff --git a/.github/actions/isStagingDeployLocked/index.js b/.github/actions/isStagingDeployLocked/index.js index 28c38562b6a9..b1ab0bb4e616 100644 --- a/.github/actions/isStagingDeployLocked/index.js +++ b/.github/actions/isStagingDeployLocked/index.js @@ -158,7 +158,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+-\s.*\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...'); @@ -166,7 +166,7 @@ class GithubUtils { } PRListSection = PRListSection[1]; const unverifiedPRs = _.map( - [...PRListSection.matchAll(new RegExp(`- \\[ ] (${PULL_REQUEST_REGEX.source})`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[ \\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getPullRequestNumberFromURL(match[1]), @@ -174,7 +174,7 @@ class GithubUtils { }), ); const verifiedPRs = _.map( - [...PRListSection.matchAll(new RegExp(`- \\[x] (${PULL_REQUEST_REGEX.source})`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[x\\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getPullRequestNumberFromURL(match[1]), @@ -202,7 +202,7 @@ class GithubUtils { } deployBlockerSection = deployBlockerSection[1]; const unresolvedDeployBlockers = _.map( - [...deployBlockerSection.matchAll(new RegExp(`- \\[ ] (${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))], + [...deployBlockerSection.matchAll(new RegExp(`- (${ISSUE_OR_PULL_REQUEST_REGEX.source})\\s+- \\[ \\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getIssueOrPullRequestNumberFromURL(match[1]), @@ -210,7 +210,7 @@ class GithubUtils { }), ); const resolvedDeployBlockers = _.map( - [...deployBlockerSection.matchAll(new RegExp(`- \\[x] (${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))], + [...deployBlockerSection.matchAll(new RegExp(`- (${ISSUE_OR_PULL_REQUEST_REGEX.source})\\s+- \\[x\\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getIssueOrPullRequestNumberFromURL(match[1]), @@ -229,6 +229,7 @@ class GithubUtils { * @param {String} tag * @param {Array} PRList - The list of PR URLs which are included in this StagingDeployCash * @param {Array} [verifiedPRList] - The list of PR URLs which have passed QA. + * @param {Array} [accessablePRList] - The list of PR URLs which have passed the accessability check. * @param {Array} [deployBlockers] - The list of DeployBlocker URLs. * @param {Array} [resolvedDeployBlockers] - The list of DeployBlockers URLs which have been resolved. * @returns {Promise} @@ -237,6 +238,7 @@ class GithubUtils { tag, PRList, verifiedPRList = [], + accessablePRList = [], deployBlockers = [], resolvedDeployBlockers = [], ) { @@ -263,23 +265,24 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; + issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += _.contains(verifiedPRList, URL) ? '- [x]' : '- [ ]'; - issueBody += ` ${URL}\r\n`; + issueBody += `\r\n\r\n- ${URL}`; + issueBody += _.contains(verifiedPRList, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; + issueBody += _.contains(accessablePRList, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; }); } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n**Deploy Blockers:**\r\n'; + issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x]' : '- [ ]'; - issueBody += ` ${URL}\r\n`; + issueBody += `\r\n\r\n- ${URL}`; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; }); } - issueBody += '\r\ncc @Expensify/applauseleads\r\n'; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) .catch(err => console.warn( diff --git a/.github/actions/markPullRequestsAsDeployed/index.js b/.github/actions/markPullRequestsAsDeployed/index.js index e8a45ce605c7..56aee6fe89a7 100644 --- a/.github/actions/markPullRequestsAsDeployed/index.js +++ b/.github/actions/markPullRequestsAsDeployed/index.js @@ -310,7 +310,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+-\s.*\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,7 +318,7 @@ class GithubUtils { } PRListSection = PRListSection[1]; const unverifiedPRs = _.map( - [...PRListSection.matchAll(new RegExp(`- \\[ ] (${PULL_REQUEST_REGEX.source})`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[ \\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getPullRequestNumberFromURL(match[1]), @@ -326,7 +326,7 @@ class GithubUtils { }), ); const verifiedPRs = _.map( - [...PRListSection.matchAll(new RegExp(`- \\[x] (${PULL_REQUEST_REGEX.source})`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[x\\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getPullRequestNumberFromURL(match[1]), @@ -354,7 +354,7 @@ class GithubUtils { } deployBlockerSection = deployBlockerSection[1]; const unresolvedDeployBlockers = _.map( - [...deployBlockerSection.matchAll(new RegExp(`- \\[ ] (${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))], + [...deployBlockerSection.matchAll(new RegExp(`- (${ISSUE_OR_PULL_REQUEST_REGEX.source})\\s+- \\[ \\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getIssueOrPullRequestNumberFromURL(match[1]), @@ -362,7 +362,7 @@ class GithubUtils { }), ); const resolvedDeployBlockers = _.map( - [...deployBlockerSection.matchAll(new RegExp(`- \\[x] (${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))], + [...deployBlockerSection.matchAll(new RegExp(`- (${ISSUE_OR_PULL_REQUEST_REGEX.source})\\s+- \\[x\\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getIssueOrPullRequestNumberFromURL(match[1]), @@ -381,6 +381,7 @@ class GithubUtils { * @param {String} tag * @param {Array} PRList - The list of PR URLs which are included in this StagingDeployCash * @param {Array} [verifiedPRList] - The list of PR URLs which have passed QA. + * @param {Array} [accessablePRList] - The list of PR URLs which have passed the accessability check. * @param {Array} [deployBlockers] - The list of DeployBlocker URLs. * @param {Array} [resolvedDeployBlockers] - The list of DeployBlockers URLs which have been resolved. * @returns {Promise} @@ -389,6 +390,7 @@ class GithubUtils { tag, PRList, verifiedPRList = [], + accessablePRList = [], deployBlockers = [], resolvedDeployBlockers = [], ) { @@ -415,23 +417,24 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; + issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += _.contains(verifiedPRList, URL) ? '- [x]' : '- [ ]'; - issueBody += ` ${URL}\r\n`; + issueBody += `\r\n\r\n- ${URL}`; + issueBody += _.contains(verifiedPRList, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; + issueBody += _.contains(accessablePRList, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; }); } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n**Deploy Blockers:**\r\n'; + issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x]' : '- [ ]'; - issueBody += ` ${URL}\r\n`; + issueBody += `\r\n\r\n- ${URL}`; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; }); } - issueBody += '\r\ncc @Expensify/applauseleads\r\n'; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) .catch(err => console.warn( diff --git a/.github/actions/reopenIssueWithComment/index.js b/.github/actions/reopenIssueWithComment/index.js index 048a967d27f1..83ba1f42b05d 100644 --- a/.github/actions/reopenIssueWithComment/index.js +++ b/.github/actions/reopenIssueWithComment/index.js @@ -169,7 +169,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+-\s.*\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...'); @@ -177,7 +177,7 @@ class GithubUtils { } PRListSection = PRListSection[1]; const unverifiedPRs = _.map( - [...PRListSection.matchAll(new RegExp(`- \\[ ] (${PULL_REQUEST_REGEX.source})`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[ \\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getPullRequestNumberFromURL(match[1]), @@ -185,7 +185,7 @@ class GithubUtils { }), ); const verifiedPRs = _.map( - [...PRListSection.matchAll(new RegExp(`- \\[x] (${PULL_REQUEST_REGEX.source})`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[x\\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getPullRequestNumberFromURL(match[1]), @@ -213,7 +213,7 @@ class GithubUtils { } deployBlockerSection = deployBlockerSection[1]; const unresolvedDeployBlockers = _.map( - [...deployBlockerSection.matchAll(new RegExp(`- \\[ ] (${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))], + [...deployBlockerSection.matchAll(new RegExp(`- (${ISSUE_OR_PULL_REQUEST_REGEX.source})\\s+- \\[ \\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getIssueOrPullRequestNumberFromURL(match[1]), @@ -221,7 +221,7 @@ class GithubUtils { }), ); const resolvedDeployBlockers = _.map( - [...deployBlockerSection.matchAll(new RegExp(`- \\[x] (${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))], + [...deployBlockerSection.matchAll(new RegExp(`- (${ISSUE_OR_PULL_REQUEST_REGEX.source})\\s+- \\[x\\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getIssueOrPullRequestNumberFromURL(match[1]), @@ -240,6 +240,7 @@ class GithubUtils { * @param {String} tag * @param {Array} PRList - The list of PR URLs which are included in this StagingDeployCash * @param {Array} [verifiedPRList] - The list of PR URLs which have passed QA. + * @param {Array} [accessablePRList] - The list of PR URLs which have passed the accessability check. * @param {Array} [deployBlockers] - The list of DeployBlocker URLs. * @param {Array} [resolvedDeployBlockers] - The list of DeployBlockers URLs which have been resolved. * @returns {Promise} @@ -248,6 +249,7 @@ class GithubUtils { tag, PRList, verifiedPRList = [], + accessablePRList = [], deployBlockers = [], resolvedDeployBlockers = [], ) { @@ -274,23 +276,24 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; + issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += _.contains(verifiedPRList, URL) ? '- [x]' : '- [ ]'; - issueBody += ` ${URL}\r\n`; + issueBody += `\r\n\r\n- ${URL}`; + issueBody += _.contains(verifiedPRList, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; + issueBody += _.contains(accessablePRList, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; }); } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n**Deploy Blockers:**\r\n'; + issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x]' : '- [ ]'; - issueBody += ` ${URL}\r\n`; + issueBody += `\r\n\r\n- ${URL}`; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; }); } - issueBody += '\r\ncc @Expensify/applauseleads\r\n'; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) .catch(err => console.warn( diff --git a/.github/actions/triggerWorkflowAndWait/index.js b/.github/actions/triggerWorkflowAndWait/index.js index 466b8fda4ac7..e0807fa0aa71 100644 --- a/.github/actions/triggerWorkflowAndWait/index.js +++ b/.github/actions/triggerWorkflowAndWait/index.js @@ -320,7 +320,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+-\s.*\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...'); @@ -328,7 +328,7 @@ class GithubUtils { } PRListSection = PRListSection[1]; const unverifiedPRs = _.map( - [...PRListSection.matchAll(new RegExp(`- \\[ ] (${PULL_REQUEST_REGEX.source})`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[ \\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getPullRequestNumberFromURL(match[1]), @@ -336,7 +336,7 @@ class GithubUtils { }), ); const verifiedPRs = _.map( - [...PRListSection.matchAll(new RegExp(`- \\[x] (${PULL_REQUEST_REGEX.source})`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[x\\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getPullRequestNumberFromURL(match[1]), @@ -364,7 +364,7 @@ class GithubUtils { } deployBlockerSection = deployBlockerSection[1]; const unresolvedDeployBlockers = _.map( - [...deployBlockerSection.matchAll(new RegExp(`- \\[ ] (${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))], + [...deployBlockerSection.matchAll(new RegExp(`- (${ISSUE_OR_PULL_REQUEST_REGEX.source})\\s+- \\[ \\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getIssueOrPullRequestNumberFromURL(match[1]), @@ -372,7 +372,7 @@ class GithubUtils { }), ); const resolvedDeployBlockers = _.map( - [...deployBlockerSection.matchAll(new RegExp(`- \\[x] (${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))], + [...deployBlockerSection.matchAll(new RegExp(`- (${ISSUE_OR_PULL_REQUEST_REGEX.source})\\s+- \\[x\\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getIssueOrPullRequestNumberFromURL(match[1]), @@ -391,6 +391,7 @@ class GithubUtils { * @param {String} tag * @param {Array} PRList - The list of PR URLs which are included in this StagingDeployCash * @param {Array} [verifiedPRList] - The list of PR URLs which have passed QA. + * @param {Array} [accessablePRList] - The list of PR URLs which have passed the accessability check. * @param {Array} [deployBlockers] - The list of DeployBlocker URLs. * @param {Array} [resolvedDeployBlockers] - The list of DeployBlockers URLs which have been resolved. * @returns {Promise} @@ -399,6 +400,7 @@ class GithubUtils { tag, PRList, verifiedPRList = [], + accessablePRList = [], deployBlockers = [], resolvedDeployBlockers = [], ) { @@ -425,23 +427,24 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; + issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += _.contains(verifiedPRList, URL) ? '- [x]' : '- [ ]'; - issueBody += ` ${URL}\r\n`; + issueBody += `\r\n\r\n- ${URL}`; + issueBody += _.contains(verifiedPRList, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; + issueBody += _.contains(accessablePRList, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; }); } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n**Deploy Blockers:**\r\n'; + issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x]' : '- [ ]'; - issueBody += ` ${URL}\r\n`; + issueBody += `\r\n\r\n- ${URL}`; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; }); } - issueBody += '\r\ncc @Expensify/applauseleads\r\n'; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) .catch(err => console.warn( diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index e3ecb66c2e5a..da6209d376c3 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -118,7 +118,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+-\s.*\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...'); @@ -126,7 +126,7 @@ class GithubUtils { } PRListSection = PRListSection[1]; const unverifiedPRs = _.map( - [...PRListSection.matchAll(new RegExp(`- \\[ ] (${PULL_REQUEST_REGEX.source})`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[ \\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getPullRequestNumberFromURL(match[1]), @@ -134,7 +134,7 @@ class GithubUtils { }), ); const verifiedPRs = _.map( - [...PRListSection.matchAll(new RegExp(`- \\[x] (${PULL_REQUEST_REGEX.source})`, 'g'))], + [...PRListSection.matchAll(new RegExp(`- (${PULL_REQUEST_REGEX.source})\\s+- \\[x\\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getPullRequestNumberFromURL(match[1]), @@ -162,7 +162,7 @@ class GithubUtils { } deployBlockerSection = deployBlockerSection[1]; const unresolvedDeployBlockers = _.map( - [...deployBlockerSection.matchAll(new RegExp(`- \\[ ] (${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))], + [...deployBlockerSection.matchAll(new RegExp(`- (${ISSUE_OR_PULL_REQUEST_REGEX.source})\\s+- \\[ \\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getIssueOrPullRequestNumberFromURL(match[1]), @@ -170,7 +170,7 @@ class GithubUtils { }), ); const resolvedDeployBlockers = _.map( - [...deployBlockerSection.matchAll(new RegExp(`- \\[x] (${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))], + [...deployBlockerSection.matchAll(new RegExp(`- (${ISSUE_OR_PULL_REQUEST_REGEX.source})\\s+- \\[x\\] QA`, 'g'))], match => ({ url: match[1], number: GithubUtils.getIssueOrPullRequestNumberFromURL(match[1]), @@ -189,6 +189,7 @@ class GithubUtils { * @param {String} tag * @param {Array} PRList - The list of PR URLs which are included in this StagingDeployCash * @param {Array} [verifiedPRList] - The list of PR URLs which have passed QA. + * @param {Array} [accessablePRList] - The list of PR URLs which have passed the accessability check. * @param {Array} [deployBlockers] - The list of DeployBlocker URLs. * @param {Array} [resolvedDeployBlockers] - The list of DeployBlockers URLs which have been resolved. * @returns {Promise} @@ -197,6 +198,7 @@ class GithubUtils { tag, PRList, verifiedPRList = [], + accessablePRList = [], deployBlockers = [], resolvedDeployBlockers = [], ) { @@ -223,23 +225,24 @@ class GithubUtils { // PR list if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; + issueBody += '\r\n**This release contains changes from the following pull requests:**'; _.each(sortedPRList, (URL) => { - issueBody += _.contains(verifiedPRList, URL) ? '- [x]' : '- [ ]'; - issueBody += ` ${URL}\r\n`; + issueBody += `\r\n\r\n- ${URL}`; + issueBody += _.contains(verifiedPRList, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; + issueBody += _.contains(accessablePRList, URL) ? '\r\n - [x] Accessibility' : '\r\n - [ ] Accessibility'; }); } // Deploy blockers if (!_.isEmpty(deployBlockers)) { - issueBody += '\r\n**Deploy Blockers:**\r\n'; + issueBody += '\r\n\r\n\r\n**Deploy Blockers:**'; _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x]' : '- [ ]'; - issueBody += ` ${URL}\r\n`; + issueBody += `\r\n\r\n- ${URL}`; + issueBody += _.contains(resolvedDeployBlockers, URL) ? '\r\n - [x] QA' : '\r\n - [ ] QA'; }); } - issueBody += '\r\ncc @Expensify/applauseleads\r\n'; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) .catch(err => console.warn( diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index 5ef465413091..5c09db85fb87 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -25,11 +25,11 @@ 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\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 - [ ] 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', }; const issueWithDeployBlockers = {...baseIssue}; // eslint-disable-next-line max-len - issueWithDeployBlockers.body += '\r\n**Deploy Blockers:**\r\n- [ ] https://github.com/Expensify/App/issues/1\r\n- [x] https://github.com/Expensify/App/issues/2\r\n- [ ] https://github.com/Expensify/App/pull/1234\r\n'; + issueWithDeployBlockers.body += '\r\n**Deploy Blockers:**\r\n- https://github.com/Expensify/App/issues/1\r\n - [ ] QA\r\n - [ ] Accessibility\r\n\r\n- https://github.com/Expensify/App/issues/2\r\n - [x] QA\r\n - [ ] Accessibility\r\n\r\n- https://github.com/Expensify/App/pull/1234\r\n - [ ] QA\r\n - [ ] Accessibility\r\n\r\n'; const baseExpectedResponse = { PRList: [ @@ -275,9 +275,9 @@ describe('GithubUtils', () => { const basePRList = [ 'https://github.com/Expensify/App/pull/2', 'https://github.com/Expensify/App/pull/3', - 'https://github.com/Expensify/App/pull/3', 'https://github.com/Expensify/App/pull/1', 'https://github.com/Expensify/App/pull/4', + 'https://github.com/Expensify/App/pull/3', // This is an intentional duplicate for testing duplicates ]; const baseDeployBlockerList = [ @@ -286,61 +286,98 @@ 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:**\r\n`; - const openCheckbox = '- [ ]'; - const closedCheckbox = '- [x]'; + 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 QA = ' QA'; + const accessibility = ' Accessibility'; + const ccApplauseLeads = 'cc @Expensify/applauseleads\r\n'; + const deployBlockerHeader = '\r\n**Deploy Blockers:**'; + const lineBreak = '\r\n'; + const lineBreakDouble = '\r\n\r\n'; + + // Valid output which will be reused in the deploy blocker tests + const allVerifiedExpectedOutput = `${baseExpectedOutput}` + + `${lineBreakDouble}${listStart}${basePRList[2]}${lineBreak}${closedCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[0]}${lineBreak}${closedCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[1]}${lineBreak}${closedCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}`; - const ccApplauseLeads = '\r\ncc @Expensify/applauseleads\r\n'; test('Test no verified PRs', () => ( githubUtils.generateStagingDeployCashBody(tag, basePRList) .then((issueBody) => { - // eslint-disable-next-line max-len - expect(issueBody).toBe(`${baseExpectedOutput}${openCheckbox} ${basePRList[3]}\r\n${openCheckbox} ${basePRList[0]}\r\n${openCheckbox} ${basePRList[1]}\r\n${ccApplauseLeads}`); + expect(issueBody).toBe( + `${baseExpectedOutput}` + + `${lineBreakDouble}${listStart}${basePRList[2]}${lineBreak}${openCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[0]}${lineBreak}${openCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[1]}${lineBreak}${openCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${ccApplauseLeads}`, + ); }) )); test('Test some verified PRs', () => ( githubUtils.generateStagingDeployCashBody(tag, basePRList, [basePRList[0]]) .then((issueBody) => { - // eslint-disable-next-line max-len - expect(issueBody).toBe(`${baseExpectedOutput}${openCheckbox} ${basePRList[3]}\r\n${closedCheckbox} ${basePRList[0]}\r\n${openCheckbox} ${basePRList[1]}\r\n${ccApplauseLeads}`); + expect(issueBody).toBe( + `${baseExpectedOutput}` + + `${lineBreakDouble}${listStart}${basePRList[2]}${lineBreak}${openCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[0]}${lineBreak}${closedCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[1]}${lineBreak}${openCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${ccApplauseLeads}`, + ); }) )); - // eslint-disable-next-line max-len - const allVerifiedExpectedOutput = `${baseExpectedOutput}${closedCheckbox} ${basePRList[3]}\r\n${closedCheckbox} ${basePRList[0]}\r\n${closedCheckbox} ${basePRList[1]}\r\n`; test('Test all verified PRs', () => ( githubUtils.generateStagingDeployCashBody(tag, basePRList, basePRList) .then((issueBody) => { - expect(issueBody).toBe(`${allVerifiedExpectedOutput}${ccApplauseLeads}`); + expect(issueBody).toBe( + `${allVerifiedExpectedOutput}${lineBreakDouble}${ccApplauseLeads}`, + ); }) )); - const deployBlockerHeader = '\r\n**Deploy Blockers:**\r\n'; test('Test no resolved deploy blockers', () => ( - githubUtils.generateStagingDeployCashBody(tag, basePRList, basePRList, baseDeployBlockerList) + githubUtils.generateStagingDeployCashBody(tag, basePRList, basePRList, [], baseDeployBlockerList) .then((issueBody) => { - // eslint-disable-next-line max-len - expect(issueBody).toBe(`${allVerifiedExpectedOutput}${deployBlockerHeader}${openCheckbox} ${baseDeployBlockerList[0]}\r\n${openCheckbox} ${baseDeployBlockerList[1]}\r\n${ccApplauseLeads}`); + expect(issueBody).toBe( + `${allVerifiedExpectedOutput}` + + `${lineBreakDouble}${deployBlockerHeader}` + + `${lineBreakDouble}${listStart}${baseDeployBlockerList[0]}${lineBreak}${openCheckbox}${QA}` + + `${lineBreakDouble}${listStart}${baseDeployBlockerList[1]}${lineBreak}${openCheckbox}${QA}` + + `${lineBreakDouble}${ccApplauseLeads}`, + ); }) )); test('Test some resolved deploy blockers', () => ( - // eslint-disable-next-line max-len - githubUtils.generateStagingDeployCashBody(tag, basePRList, basePRList, baseDeployBlockerList, [baseDeployBlockerList[0]]) + githubUtils.generateStagingDeployCashBody(tag, basePRList, basePRList, [], baseDeployBlockerList, [baseDeployBlockerList[0]]) .then((issueBody) => { - // eslint-disable-next-line max-len - expect(issueBody).toBe(`${allVerifiedExpectedOutput}${deployBlockerHeader}${closedCheckbox} ${baseDeployBlockerList[0]}\r\n${openCheckbox} ${baseDeployBlockerList[1]}\r\n${ccApplauseLeads}`); + expect(issueBody).toBe( + `${allVerifiedExpectedOutput}` + + `${lineBreakDouble}${deployBlockerHeader}` + + `${lineBreakDouble}${listStart}${baseDeployBlockerList[0]}${lineBreak}${closedCheckbox}${QA}` + + `${lineBreakDouble}${listStart}${baseDeployBlockerList[1]}${lineBreak}${openCheckbox}${QA}` + + `${lineBreakDouble}${ccApplauseLeads}`, + ); }) )); test('Test all resolved deploy blockers', () => ( - // eslint-disable-next-line max-len - githubUtils.generateStagingDeployCashBody(tag, basePRList, basePRList, baseDeployBlockerList, baseDeployBlockerList) + githubUtils.generateStagingDeployCashBody(tag, basePRList, basePRList, baseDeployBlockerList, baseDeployBlockerList, baseDeployBlockerList) .then((issueBody) => { - // eslint-disable-next-line max-len - expect(issueBody).toBe(`${allVerifiedExpectedOutput}${deployBlockerHeader}${closedCheckbox} ${baseDeployBlockerList[0]}\r\n${closedCheckbox} ${baseDeployBlockerList[1]}\r\n${ccApplauseLeads}`); + expect(issueBody).toBe( + `${baseExpectedOutput}` + + `${lineBreakDouble}${listStart}${basePRList[2]}${lineBreak}${closedCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[0]}${lineBreak}${closedCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[1]}${lineBreak}${closedCheckbox}${QA}${lineBreak}${closedCheckbox}${accessibility}` + + `${lineBreakDouble}${deployBlockerHeader}` + + `${lineBreakDouble}${listStart}${baseDeployBlockerList[0]}${lineBreak}${closedCheckbox}${QA}` + + `${lineBreakDouble}${listStart}${baseDeployBlockerList[1]}${lineBreak}${closedCheckbox}${QA}` + + `${lineBreakDouble}${ccApplauseLeads}`, + ); }) )); }); diff --git a/tests/unit/createOrUpdateStagingDeployTest.js b/tests/unit/createOrUpdateStagingDeployTest.js index 3286f2b19c8d..0cb834a9e8ef 100644 --- a/tests/unit/createOrUpdateStagingDeployTest.js +++ b/tests/unit/createOrUpdateStagingDeployTest.js @@ -76,6 +76,37 @@ const LABELS = { }, }; +const basePRList = [ + 'https://github.com/Expensify/App/pull/1', + 'https://github.com/Expensify/App/pull/2', + 'https://github.com/Expensify/App/pull/3', + 'https://github.com/Expensify/App/pull/4', + 'https://github.com/Expensify/App/pull/5', + 'https://github.com/Expensify/App/pull/6', + 'https://github.com/Expensify/App/pull/7', + 'https://github.com/Expensify/App/pull/8', + 'https://github.com/Expensify/App/pull/9', + 'https://github.com/Expensify/App/pull/10', + 'https://github.com/Expensify/App/issues/11', + 'https://github.com/Expensify/App/issues/12', +]; + +const baseIssueList = [ + 'https://github.com/Expensify/App/issues/11', + '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 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 lineBreak = '\r\n'; +const lineBreakDouble = '\r\n\r\n'; + describe('createOrUpdateStagingDeployCash', () => { const closedStagingDeployCash = { url: 'https://api.github.com/repos/Expensify/App/issues/28', @@ -84,8 +115,15 @@ describe('createOrUpdateStagingDeployCash', () => { labels: [LABELS.STAGING_DEPLOY_CASH], html_url: 'https://github.com/Expensify/App/issues/29', // eslint-disable-next-line max-len - body: '**Release Version:** `1.0.1-0`\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- [x] https://github.com/Expensify/App/pull/1\r\n- [x] https://github.com/Expensify/App/pull/2\r\n- [x] https://github.com/Expensify/App/pull/3\r\n\r\n**Deploy Blockers:**\r\n- [x] https://github.com/Expensify/App/pull/1\r\n- [x] https://github.com/Expensify/App/issues/4\r\n- [x] https://github.com/Expensify/App/issues/5\r\n\r\ncc @Expensify/applauseleads\r\n', - state: 'closed', + body: `${baseExpectedOutput('1.0.1-0')}` + + `${lineBreakDouble}${listStart}${basePRList[0]}${lineBreak}${closedCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[1]}${lineBreak}${closedCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[2]}${lineBreak}${closedCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${deployBlockerHeader}` + + `${lineBreakDouble}${listStart}${basePRList[0]}${lineBreak}${closedCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[3]}${lineBreak}${closedCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[4]}${lineBreak}${closedCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${ccApplauseLeads}`, }; const baseNewPullRequests = ['6', '7', '8']; @@ -126,8 +164,11 @@ describe('createOrUpdateStagingDeployCash', () => { labels: [GithubUtils.STAGING_DEPLOY_CASH_LABEL], html_url: 'https://github.com/Expensify/App/issues/29', assignees: [GithubUtils.APPLAUSE_BOT], - // eslint-disable-next-line max-len - body: '**Release Version:** `1.0.2-1`\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/6\r\n- [ ] https://github.com/Expensify/App/pull/7\r\n- [ ] https://github.com/Expensify/App/pull/8\r\n\r\ncc @Expensify/applauseleads\r\n', + body: `${baseExpectedOutput()}` + + `${lineBreakDouble}${listStart}${basePRList[5]}${lineBreak}${openCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[6]}${lineBreak}${openCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[7]}${lineBreak}${openCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${ccApplauseLeads}`, }); }); }); @@ -139,7 +180,15 @@ describe('createOrUpdateStagingDeployCash', () => { number: 29, labels: [LABELS.STAGING_DEPLOY_CASH], // eslint-disable-next-line max-len - body: '**Release Version:** `1.0.2-1`\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/6\r\n- [x] https://github.com/Expensify/App/pull/7\r\n- [ ] https://github.com/Expensify/App/pull/8\r\n\r\n**Deploy Blockers:**\r\n- [ ] https://github.com/Expensify/App/pull/6\r\n- [ ] https://github.com/Expensify/App/issues/9\r\n- [x] https://github.com/Expensify/App/issues/10\r\n\r\ncc @Expensify/applauseleads\r\n', + body: `${baseExpectedOutput()}` + + `${lineBreakDouble}${listStart}${basePRList[5]}${lineBreak}${openCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[6]}${lineBreak}${closedCheckbox}${QA}${lineBreak}${closedCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[7]}${lineBreak}${openCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${deployBlockerHeader}` + + `${lineBreakDouble}${listStart}${basePRList[5]}${lineBreak}${openCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[8]}${lineBreak}${openCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[9]}${lineBreak}${closedCheckbox}${QA}${lineBreak}${closedCheckbox}${accessibility}` + + `${lineBreakDouble}${ccApplauseLeads}`, state: 'open', }; @@ -223,7 +272,19 @@ describe('createOrUpdateStagingDeployCash', () => { // eslint-disable-next-line max-len html_url: `https://github.com/Expensify/App/issues/${openStagingDeployCashBefore.number}`, // eslint-disable-next-line max-len - body: `**Release Version:** \`1.0.2-2\`\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/6\r\n- [x] https://github.com/Expensify/App/pull/7\r\n- [ ] https://github.com/Expensify/App/pull/8\r\n- [ ] https://github.com/Expensify/App/pull/${newPullRequests[0]}\r\n- [ ] https://github.com/Expensify/App/pull/${newPullRequests[1]}\r\n\r\n**Deploy Blockers:**\r\n- [ ] https://github.com/Expensify/App/pull/6\r\n- [ ] https://github.com/Expensify/App/issues/9\r\n- [x] https://github.com/Expensify/App/issues/10\r\n- [ ] https://github.com/Expensify/App/issues/11\r\n- [ ] https://github.com/Expensify/App/issues/12\r\n\r\ncc @Expensify/applauseleads\r\n`, + body: `${baseExpectedOutput('1.0.2-2')}` + + `${lineBreakDouble}${listStart}${basePRList[5]}${lineBreak}${openCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[6]}${lineBreak}${closedCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[7]}${lineBreak}${openCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[8]}${lineBreak}${openCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[9]}${lineBreak}${openCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${deployBlockerHeader}` + + `${lineBreakDouble}${listStart}${basePRList[5]}${lineBreak}${openCheckbox}${QA}` + + `${lineBreakDouble}${listStart}${basePRList[8]}${lineBreak}${openCheckbox}${QA}` + + `${lineBreakDouble}${listStart}${basePRList[9]}${lineBreak}${closedCheckbox}${QA}` + + `${lineBreakDouble}${listStart}${basePRList[10]}${lineBreak}${openCheckbox}${QA}` + + `${lineBreakDouble}${listStart}${basePRList[11]}${lineBreak}${openCheckbox}${QA}` + + `${lineBreakDouble}${ccApplauseLeads}`, }); }); }); @@ -273,7 +334,17 @@ describe('createOrUpdateStagingDeployCash', () => { // eslint-disable-next-line max-len html_url: `https://github.com/Expensify/App/issues/${openStagingDeployCashBefore.number}`, // eslint-disable-next-line max-len - body: '**Release Version:** `1.0.2-2`\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/6\r\n- [x] https://github.com/Expensify/App/pull/7\r\n- [ ] https://github.com/Expensify/App/pull/8\r\n\r\n**Deploy Blockers:**\r\n- [ ] https://github.com/Expensify/App/pull/6\r\n- [ ] https://github.com/Expensify/App/issues/9\r\n- [x] https://github.com/Expensify/App/issues/10\r\n- [ ] https://github.com/Expensify/App/issues/11\r\n- [ ] https://github.com/Expensify/App/issues/12\r\n\r\ncc @Expensify/applauseleads\r\n', + body: `${baseExpectedOutput('1.0.2-2')}` + + `${lineBreakDouble}${listStart}${basePRList[5]}${lineBreak}${openCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[6]}${lineBreak}${closedCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${listStart}${basePRList[7]}${lineBreak}${openCheckbox}${QA}${lineBreak}${openCheckbox}${accessibility}` + + `${lineBreakDouble}${deployBlockerHeader}` + + `${lineBreakDouble}${listStart}${basePRList[5]}${lineBreak}${openCheckbox}${QA}` + + `${lineBreakDouble}${listStart}${basePRList[8]}${lineBreak}${openCheckbox}${QA}` + + `${lineBreakDouble}${listStart}${basePRList[9]}${lineBreak}${closedCheckbox}${QA}` + + `${lineBreakDouble}${listStart}${baseIssueList[0]}${lineBreak}${openCheckbox}${QA}` + + `${lineBreakDouble}${listStart}${baseIssueList[1]}${lineBreak}${openCheckbox}${QA}` + + `${lineBreakDouble}${ccApplauseLeads}`, }); }); });