From 2ff06ce90a9413ce566f21ba1764ed87dee2c8c6 Mon Sep 17 00:00:00 2001 From: Rory Abraham Date: Wed, 6 Apr 2022 12:13:33 -0700 Subject: [PATCH 1/3] Update checkDeployBlockers to look for any open checkbox except accessibility --- .github/actions/checkDeployBlockers/checkDeployBlockers.js | 2 +- .github/actions/checkDeployBlockers/index.js | 2 +- .github/workflows/finishReleaseCycle.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/checkDeployBlockers/checkDeployBlockers.js b/.github/actions/checkDeployBlockers/checkDeployBlockers.js index 89c4843cc9d3..db156651f9fe 100644 --- a/.github/actions/checkDeployBlockers/checkDeployBlockers.js +++ b/.github/actions/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 = new RegExp(`-\\s\\[\\s]\\s(?:QA|${GithubUtils.ISSUE_OR_PULL_REQUEST_REGEX.source})`); + const uncheckedBoxRegex = /-\s\[\s]\s(?!Accessibility)/; if (uncheckedBoxRegex.test(data.body)) { console.log('An unverified PR or unresolved deploy blocker was found.'); core.setOutput('HAS_DEPLOY_BLOCKERS', true); diff --git a/.github/actions/checkDeployBlockers/index.js b/.github/actions/checkDeployBlockers/index.js index 51e878382f01..6e9a173d5614 100644 --- a/.github/actions/checkDeployBlockers/index.js +++ b/.github/actions/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 = new RegExp(`-\\s\\[\\s]\\s(?:QA|${GithubUtils.ISSUE_OR_PULL_REQUEST_REGEX.source})`); + const uncheckedBoxRegex = /-\s\[\s]\s(?!Accessibility)/; if (uncheckedBoxRegex.test(data.body)) { console.log('An unverified PR or unresolved deploy blocker was found.'); core.setOutput('HAS_DEPLOY_BLOCKERS', true); diff --git a/.github/workflows/finishReleaseCycle.yml b/.github/workflows/finishReleaseCycle.yml index fe0eb8aff88a..8553f9b63fbb 100644 --- a/.github/workflows/finishReleaseCycle.yml +++ b/.github/workflows/finishReleaseCycle.yml @@ -47,7 +47,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} ISSUE_NUMBER: ${{ github.event.issue.number }} COMMENT: | - This issue either has unchecked QA steps or has not yet been marked with the `:shipit:` emoji of approval. + This issue either has unchecked items or has not yet been marked with the `:shipit:` emoji of approval. Reopening! # Update the production branch to trigger the production deploy. From a2c2e298d535598ad5d9cdd84df641f6425b1b77 Mon Sep 17 00:00:00 2001 From: Rory Abraham Date: Wed, 6 Apr 2022 14:56:18 -0700 Subject: [PATCH 2/3] Implement new checkboxes in StagingDeployCash --- .github/actions/awaitStagingDeploys/index.js | 12 ++++++ .github/actions/checkDeployBlockers/index.js | 12 ++++++ .../createOrUpdateStagingDeploy.js | 3 ++ .../createOrUpdateStagingDeploy/index.js | 15 ++++++++ .../actions/getPullRequestDetails/index.js | 12 ++++++ .github/actions/getReleaseBody/index.js | 12 ++++++ .../actions/isPullRequestMergeable/index.js | 12 ++++++ .../actions/isStagingDeployLocked/index.js | 12 ++++++ .../markPullRequestsAsDeployed/index.js | 12 ++++++ .../actions/reopenIssueWithComment/index.js | 12 ++++++ .../actions/triggerWorkflowAndWait/index.js | 12 ++++++ .github/actions/verifySignedCommits/index.js | 12 ++++++ .github/libs/GithubUtils.js | 12 ++++++ tests/unit/GithubUtilsTest.js | 38 ++++++++++++++++++- tests/unit/createOrUpdateStagingDeployTest.js | 26 ++++++++++++- 15 files changed, 212 insertions(+), 2 deletions(-) diff --git a/.github/actions/awaitStagingDeploys/index.js b/.github/actions/awaitStagingDeploys/index.js index 314a4d03295b..c6ece6eee302 100644 --- a/.github/actions/awaitStagingDeploys/index.js +++ b/.github/actions/awaitStagingDeploys/index.js @@ -226,6 +226,8 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), + isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, }; } catch (exception) { @@ -295,6 +297,8 @@ class GithubUtils { * @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] + * @param {Boolean} [isFirebaseChecked] * @returns {Promise} */ static generateStagingDeployCashBody( @@ -304,6 +308,8 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + isTimingDashboardChecked = false, + isFirebaseChecked = false, ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { @@ -376,6 +382,12 @@ class GithubUtils { }); } + issueBody += '\r\n\r\n**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 + issueBody += `\r\n- [${isFirebaseChecked ? 'x' : ' '}] 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.`; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) diff --git a/.github/actions/checkDeployBlockers/index.js b/.github/actions/checkDeployBlockers/index.js index 6e9a173d5614..179dc8b4a078 100644 --- a/.github/actions/checkDeployBlockers/index.js +++ b/.github/actions/checkDeployBlockers/index.js @@ -196,6 +196,8 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), + isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, }; } catch (exception) { @@ -265,6 +267,8 @@ class GithubUtils { * @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] + * @param {Boolean} [isFirebaseChecked] * @returns {Promise} */ static generateStagingDeployCashBody( @@ -274,6 +278,8 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + isTimingDashboardChecked = false, + isFirebaseChecked = false, ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { @@ -346,6 +352,12 @@ class GithubUtils { }); } + issueBody += '\r\n\r\n**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 + issueBody += `\r\n- [${isFirebaseChecked ? 'x' : ' '}] 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.`; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) diff --git a/.github/actions/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js b/.github/actions/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js index 56535f03b29c..43992307b912 100644 --- a/.github/actions/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js +++ b/.github/actions/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js @@ -85,6 +85,7 @@ const run = function () { // If we aren't sent a tag, then use the existing tag const tag = newVersion || currentStagingDeployCashData.tag; + const didVersionChange = newVersion ? newVersion !== currentStagingDeployCashData.tag : false; // Find the list of PRs merged between the last StagingDeployCash and the new version const mergedPRs = GitUtils.getPullRequestsMergedBetween(previousStagingDeployCashData.tag, tag); @@ -128,6 +129,8 @@ const run = function () { _.pluck(_.where(PRList, {isAccessible: true}), 'url'), _.pluck(deployBlockers, 'url'), _.pluck(_.where(deployBlockers, {isResolved: true}), 'url'), + didVersionChange ? false : currentStagingDeployCashData.isTimingDashboardChecked, + didVersionChange ? false : currentStagingDeployCashData.isFirebaseChecked, ); }) .then((body) => { diff --git a/.github/actions/createOrUpdateStagingDeploy/index.js b/.github/actions/createOrUpdateStagingDeploy/index.js index 58ecf86f7e9d..43fda09543d8 100644 --- a/.github/actions/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/createOrUpdateStagingDeploy/index.js @@ -95,6 +95,7 @@ const run = function () { // If we aren't sent a tag, then use the existing tag const tag = newVersion || currentStagingDeployCashData.tag; + const didVersionChange = newVersion ? newVersion !== currentStagingDeployCashData.tag : false; // Find the list of PRs merged between the last StagingDeployCash and the new version const mergedPRs = GitUtils.getPullRequestsMergedBetween(previousStagingDeployCashData.tag, tag); @@ -138,6 +139,8 @@ const run = function () { _.pluck(_.where(PRList, {isAccessible: true}), 'url'), _.pluck(deployBlockers, 'url'), _.pluck(_.where(deployBlockers, {isResolved: true}), 'url'), + didVersionChange ? false : currentStagingDeployCashData.isTimingDashboardChecked, + didVersionChange ? false : currentStagingDeployCashData.isFirebaseChecked, ); }) .then((body) => { @@ -386,6 +389,8 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), + isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, }; } catch (exception) { @@ -455,6 +460,8 @@ class GithubUtils { * @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] + * @param {Boolean} [isFirebaseChecked] * @returns {Promise} */ static generateStagingDeployCashBody( @@ -464,6 +471,8 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + isTimingDashboardChecked = false, + isFirebaseChecked = false, ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { @@ -536,6 +545,12 @@ class GithubUtils { }); } + issueBody += '\r\n\r\n**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 + issueBody += `\r\n- [${isFirebaseChecked ? 'x' : ' '}] 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.`; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) diff --git a/.github/actions/getPullRequestDetails/index.js b/.github/actions/getPullRequestDetails/index.js index 0e8fcb725620..8ef5d2f04ebf 100644 --- a/.github/actions/getPullRequestDetails/index.js +++ b/.github/actions/getPullRequestDetails/index.js @@ -267,6 +267,8 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), + isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, }; } catch (exception) { @@ -336,6 +338,8 @@ class GithubUtils { * @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] + * @param {Boolean} [isFirebaseChecked] * @returns {Promise} */ static generateStagingDeployCashBody( @@ -345,6 +349,8 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + isTimingDashboardChecked = false, + isFirebaseChecked = false, ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { @@ -417,6 +423,12 @@ class GithubUtils { }); } + issueBody += '\r\n\r\n**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 + issueBody += `\r\n- [${isFirebaseChecked ? 'x' : ' '}] 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.`; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) diff --git a/.github/actions/getReleaseBody/index.js b/.github/actions/getReleaseBody/index.js index c8c7a0d153d3..a72d730563ff 100644 --- a/.github/actions/getReleaseBody/index.js +++ b/.github/actions/getReleaseBody/index.js @@ -185,6 +185,8 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), + isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, }; } catch (exception) { @@ -254,6 +256,8 @@ class GithubUtils { * @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] + * @param {Boolean} [isFirebaseChecked] * @returns {Promise} */ static generateStagingDeployCashBody( @@ -263,6 +267,8 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + isTimingDashboardChecked = false, + isFirebaseChecked = false, ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { @@ -335,6 +341,12 @@ class GithubUtils { }); } + issueBody += '\r\n\r\n**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 + issueBody += `\r\n- [${isFirebaseChecked ? 'x' : ' '}] 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.`; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) diff --git a/.github/actions/isPullRequestMergeable/index.js b/.github/actions/isPullRequestMergeable/index.js index 3e98b961c4f7..b03366d0c9dd 100644 --- a/.github/actions/isPullRequestMergeable/index.js +++ b/.github/actions/isPullRequestMergeable/index.js @@ -186,6 +186,8 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), + isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, }; } catch (exception) { @@ -255,6 +257,8 @@ class GithubUtils { * @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] + * @param {Boolean} [isFirebaseChecked] * @returns {Promise} */ static generateStagingDeployCashBody( @@ -264,6 +268,8 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + isTimingDashboardChecked = false, + isFirebaseChecked = false, ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { @@ -336,6 +342,12 @@ class GithubUtils { }); } + issueBody += '\r\n\r\n**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 + issueBody += `\r\n- [${isFirebaseChecked ? 'x' : ' '}] 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.`; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) diff --git a/.github/actions/isStagingDeployLocked/index.js b/.github/actions/isStagingDeployLocked/index.js index 4ef5e5aa3c6e..a0e47bbe0662 100644 --- a/.github/actions/isStagingDeployLocked/index.js +++ b/.github/actions/isStagingDeployLocked/index.js @@ -149,6 +149,8 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), + isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, }; } catch (exception) { @@ -218,6 +220,8 @@ class GithubUtils { * @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] + * @param {Boolean} [isFirebaseChecked] * @returns {Promise} */ static generateStagingDeployCashBody( @@ -227,6 +231,8 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + isTimingDashboardChecked = false, + isFirebaseChecked = false, ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { @@ -299,6 +305,12 @@ class GithubUtils { }); } + issueBody += '\r\n\r\n**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 + issueBody += `\r\n- [${isFirebaseChecked ? 'x' : ' '}] 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.`; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) diff --git a/.github/actions/markPullRequestsAsDeployed/index.js b/.github/actions/markPullRequestsAsDeployed/index.js index 1ad199a5f4cf..4f881fae56c4 100644 --- a/.github/actions/markPullRequestsAsDeployed/index.js +++ b/.github/actions/markPullRequestsAsDeployed/index.js @@ -318,6 +318,8 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), + isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, }; } catch (exception) { @@ -387,6 +389,8 @@ class GithubUtils { * @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] + * @param {Boolean} [isFirebaseChecked] * @returns {Promise} */ static generateStagingDeployCashBody( @@ -396,6 +400,8 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + isTimingDashboardChecked = false, + isFirebaseChecked = false, ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { @@ -468,6 +474,12 @@ class GithubUtils { }); } + issueBody += '\r\n\r\n**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 + issueBody += `\r\n- [${isFirebaseChecked ? 'x' : ' '}] 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.`; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) diff --git a/.github/actions/reopenIssueWithComment/index.js b/.github/actions/reopenIssueWithComment/index.js index 42d09f1c766e..7c0219f6e2b3 100644 --- a/.github/actions/reopenIssueWithComment/index.js +++ b/.github/actions/reopenIssueWithComment/index.js @@ -160,6 +160,8 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), + isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, }; } catch (exception) { @@ -229,6 +231,8 @@ class GithubUtils { * @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] + * @param {Boolean} [isFirebaseChecked] * @returns {Promise} */ static generateStagingDeployCashBody( @@ -238,6 +242,8 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + isTimingDashboardChecked = false, + isFirebaseChecked = false, ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { @@ -310,6 +316,12 @@ class GithubUtils { }); } + issueBody += '\r\n\r\n**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 + issueBody += `\r\n- [${isFirebaseChecked ? 'x' : ' '}] 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.`; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) diff --git a/.github/actions/triggerWorkflowAndWait/index.js b/.github/actions/triggerWorkflowAndWait/index.js index 86a6f5039af5..a04038faa3c0 100644 --- a/.github/actions/triggerWorkflowAndWait/index.js +++ b/.github/actions/triggerWorkflowAndWait/index.js @@ -329,6 +329,8 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), + isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, }; } catch (exception) { @@ -398,6 +400,8 @@ class GithubUtils { * @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] + * @param {Boolean} [isFirebaseChecked] * @returns {Promise} */ static generateStagingDeployCashBody( @@ -407,6 +411,8 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + isTimingDashboardChecked = false, + isFirebaseChecked = false, ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { @@ -479,6 +485,12 @@ class GithubUtils { }); } + issueBody += '\r\n\r\n**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 + issueBody += `\r\n- [${isFirebaseChecked ? 'x' : ' '}] 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.`; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) diff --git a/.github/actions/verifySignedCommits/index.js b/.github/actions/verifySignedCommits/index.js index 8060ed706572..406598e3db99 100644 --- a/.github/actions/verifySignedCommits/index.js +++ b/.github/actions/verifySignedCommits/index.js @@ -149,6 +149,8 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), + isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, }; } catch (exception) { @@ -218,6 +220,8 @@ class GithubUtils { * @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] + * @param {Boolean} [isFirebaseChecked] * @returns {Promise} */ static generateStagingDeployCashBody( @@ -227,6 +231,8 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + isTimingDashboardChecked = false, + isFirebaseChecked = false, ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { @@ -299,6 +305,12 @@ class GithubUtils { }); } + issueBody += '\r\n\r\n**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 + issueBody += `\r\n- [${isFirebaseChecked ? 'x' : ' '}] 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.`; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index be5fe177c54a..220407dd1f2f 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -109,6 +109,8 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), + isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, }; } catch (exception) { @@ -178,6 +180,8 @@ class GithubUtils { * @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] + * @param {Boolean} [isFirebaseChecked] * @returns {Promise} */ static generateStagingDeployCashBody( @@ -187,6 +191,8 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + isTimingDashboardChecked = false, + isFirebaseChecked = false, ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { @@ -259,6 +265,12 @@ class GithubUtils { }); } + issueBody += '\r\n\r\n**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 + issueBody += `\r\n- [${isFirebaseChecked ? 'x' : ' '}] 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.`; + issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index ef8818a293ac..c9d44a049fc6 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -68,6 +68,8 @@ describe('GithubUtils', () => { url: 'https://api.github.com/repos/Andrew-Test-Org/Public-Test-Repo/issues/29', number: 29, deployBlockers: [], + isTimingDashboardChecked: false, + isFirebaseChecked: false, }; const expectedResponseWithDeployBlockers = {...baseExpectedResponse}; expectedResponseWithDeployBlockers.deployBlockers = [ @@ -375,6 +377,12 @@ describe('GithubUtils', () => { const lineBreakDouble = '\r\n\r\n'; const indent = ' '; const assignOctocatHubot = ' - @octocat @hubot'; + 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.'; + // 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.'; + // Valid output which will be reused in the deploy blocker tests const allVerifiedExpectedOutput = `${baseExpectedOutput}` @@ -394,6 +402,9 @@ describe('GithubUtils', () => { + `${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}` + + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + + `${lineBreak}${openCheckbox}${firebaseVerification}` + `${lineBreakDouble}${ccApplauseLeads}`, ); }) @@ -409,6 +420,9 @@ describe('GithubUtils', () => { + `${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}` + + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + + `${lineBreak}${openCheckbox}${firebaseVerification}` + `${lineBreakDouble}${ccApplauseLeads}`, ); }) @@ -424,6 +438,9 @@ describe('GithubUtils', () => { + `${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}` + + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + + `${lineBreak}${openCheckbox}${firebaseVerification}` + `${lineBreakDouble}${ccApplauseLeads}`, ); }) @@ -433,7 +450,11 @@ describe('GithubUtils', () => { githubUtils.generateStagingDeployCashBody(tag, basePRList, basePRList) .then((issueBody) => { expect(issueBody).toBe( - `${allVerifiedExpectedOutput}${lineBreakDouble}${ccApplauseLeads}`, + `${allVerifiedExpectedOutput}` + + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + + `${lineBreak}${openCheckbox}${firebaseVerification}` + + `${lineBreakDouble}${ccApplauseLeads}`, ); }) )); @@ -446,6 +467,9 @@ describe('GithubUtils', () => { + `${lineBreakDouble}${deployBlockerHeader}` + `${lineBreak}${openCheckbox}${baseDeployBlockerList[0]}` + `${lineBreak}${openCheckbox}${baseDeployBlockerList[1]}` + + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + + `${lineBreak}${openCheckbox}${firebaseVerification}` + `${lineBreakDouble}${ccApplauseLeads}`, ); }) @@ -459,6 +483,9 @@ describe('GithubUtils', () => { + `${lineBreakDouble}${deployBlockerHeader}` + `${lineBreak}${closedCheckbox}${baseDeployBlockerList[0]}` + `${lineBreak}${openCheckbox}${baseDeployBlockerList[1]}` + + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + + `${lineBreak}${openCheckbox}${firebaseVerification}` + `${lineBreakDouble}${ccApplauseLeads}`, ); }) @@ -477,6 +504,9 @@ describe('GithubUtils', () => { + `${lineBreakDouble}${deployBlockerHeader}` + `${lineBreak}${closedCheckbox}${baseDeployBlockerList[0]}` + `${lineBreak}${closedCheckbox}${baseDeployBlockerList[1]}` + + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + + `${lineBreak}${openCheckbox}${firebaseVerification}` + `${lineBreakDouble}${ccApplauseLeads}`, ); }) @@ -495,6 +525,9 @@ describe('GithubUtils', () => { + `${lineBreakDouble}${internalQAHeader}` + `${lineBreak}${openCheckbox}${internalQAPRList[0]}${assignOctocatHubot}` + `${lineBreak}${openCheckbox}${internalQAPRList[1]}${assignOctocatHubot}` + + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + + `${lineBreak}${openCheckbox}${firebaseVerification}` + `${lineBreakDouble}${ccApplauseLeads}`, ); }) @@ -513,6 +546,9 @@ describe('GithubUtils', () => { + `${lineBreakDouble}${internalQAHeader}` + `${lineBreak}${closedCheckbox}${internalQAPRList[0]}${assignOctocatHubot}` + `${lineBreak}${openCheckbox}${internalQAPRList[1]}${assignOctocatHubot}` + + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + + `${lineBreak}${openCheckbox}${firebaseVerification}` + `${lineBreakDouble}${ccApplauseLeads}`, ); }) diff --git a/tests/unit/createOrUpdateStagingDeployTest.js b/tests/unit/createOrUpdateStagingDeployTest.js index 90307c3f469c..8d059a289d2d 100644 --- a/tests/unit/createOrUpdateStagingDeployTest.js +++ b/tests/unit/createOrUpdateStagingDeployTest.js @@ -102,6 +102,11 @@ 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.'; +// 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 lineBreak = '\r\n'; @@ -169,6 +174,9 @@ describe('createOrUpdateStagingDeployCash', () => { + `${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}${deployerVerificationsHeader}` + + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + + `${lineBreak}${openCheckbox}${firebaseVerification}` + `${lineBreakDouble}${ccApplauseLeads}`, }); }); @@ -189,6 +197,9 @@ describe('createOrUpdateStagingDeployCash', () => { + `${lineBreak}${openCheckbox}${basePRList[5]}` + `${lineBreak}${openCheckbox}${basePRList[8]}` + `${lineBreak}${closedCheckbox}${basePRList[9]}` + + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreak}${closedCheckbox}${timingDashboardVerification}` + + `${lineBreak}${closedCheckbox}${firebaseVerification}` + `${lineBreakDouble}${ccApplauseLeads}`, state: 'open', }; @@ -285,12 +296,22 @@ describe('createOrUpdateStagingDeployCash', () => { + `${lineBreak}${closedCheckbox}${basePRList[9]}` + `${lineBreak}${openCheckbox}${basePRList[10]}` + `${lineBreak}${openCheckbox}${basePRList[11]}` + + `${lineBreak}${deployerVerificationsHeader}` + + // Note: these will be unchecked with a new app version, and that's intentional + + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + + `${lineBreak}${openCheckbox}${firebaseVerification}` + `${lineBreakDouble}${ccApplauseLeads}`, }); }); }); test('without NPM_VERSION input, just a new deploy blocker', () => { + mockGetInput.mockImplementation((arg) => { + if (arg === 'GITHUB_TOKEN') { + return 'fake_token'; + } + }); mockGetPullRequestsMergedBetween.mockImplementation((fromRef, toRef) => { if (fromRef === '1.0.1-0' && toRef === '1.0.2-2') { return [ @@ -335,7 +356,7 @@ 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: `${baseExpectedOutput('1.0.2-2')}` + 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}` @@ -345,6 +366,9 @@ describe('createOrUpdateStagingDeployCash', () => { + `${lineBreak}${closedCheckbox}${basePRList[9]}` + `${lineBreak}${openCheckbox}${baseIssueList[0]}` + `${lineBreak}${openCheckbox}${baseIssueList[1]}` + + `${lineBreak}${deployerVerificationsHeader}` + + `${lineBreak}${closedCheckbox}${timingDashboardVerification}` + + `${lineBreak}${closedCheckbox}${firebaseVerification}` + `${lineBreakDouble}${ccApplauseLeads}`, }); }); From 9e1aa59a43b0d90ab26228cd9e75b3a99175627e Mon Sep 17 00:00:00 2001 From: Rory Abraham Date: Wed, 6 Apr 2022 15:03:49 -0700 Subject: [PATCH 3/3] Fix JS style --- tests/unit/GithubUtilsTest.js | 1 - tests/unit/createOrUpdateStagingDeployTest.js | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index c9d44a049fc6..a5c8e8a2687f 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -383,7 +383,6 @@ describe('GithubUtils', () => { // 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.'; - // 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}` diff --git a/tests/unit/createOrUpdateStagingDeployTest.js b/tests/unit/createOrUpdateStagingDeployTest.js index 8d059a289d2d..3d9d5400e525 100644 --- a/tests/unit/createOrUpdateStagingDeployTest.js +++ b/tests/unit/createOrUpdateStagingDeployTest.js @@ -308,9 +308,10 @@ describe('createOrUpdateStagingDeployCash', () => { test('without NPM_VERSION input, just a new deploy blocker', () => { mockGetInput.mockImplementation((arg) => { - if (arg === 'GITHUB_TOKEN') { - return 'fake_token'; + if (arg !== 'GITHUB_TOKEN') { + return; } + return 'fake_token'; }); mockGetPullRequestsMergedBetween.mockImplementation((fromRef, toRef) => { if (fromRef === '1.0.1-0' && toRef === '1.0.2-2') {