From b82ca7cc5d2621654370789c0618eec34d463daf Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Sat, 16 Jul 2022 18:00:17 +0100 Subject: [PATCH 01/12] Pass the resolved internal QA PRs to the method to create new version of the deployment issue --- .../createOrUpdateStagingDeploy.js | 7 +++++++ .github/libs/GithubUtils.js | 4 +++- tests/unit/GithubUtilsTest.js | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js b/.github/actions/javascript/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js index 27db22f3ca71..401b2edffd90 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js @@ -122,6 +122,12 @@ const run = function () { 'number', ); + // Get the internalQA PR list, preserving the previous state of `isResolved` + const internalQAPRList = _.sortBy( + currentStagingDeployCashData.internalQAPRList, + 'number', + ); + return GithubUtils.generateStagingDeployCashBody( newTag, _.pluck(PRList, 'url'), @@ -129,6 +135,7 @@ const run = function () { _.pluck(_.where(PRList, {isAccessible: true}), 'url'), _.pluck(deployBlockers, 'url'), _.pluck(_.where(deployBlockers, {isResolved: true}), 'url'), + _.pluck(_.where(internalQAPRList, {isResolved: true}), 'url'), didVersionChange ? false : currentStagingDeployCashData.isTimingDashboardChecked, didVersionChange ? false : currentStagingDeployCashData.isFirebaseChecked, ); diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index b1b77249baf6..62d19e0220cb 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -109,6 +109,7 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + internalQAPRList: this.getStagingDeployCashInternalQA(issue), isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, @@ -218,6 +219,7 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + resolvedInternalQAPRs = [], isTimingDashboardChecked = false, isFirebaseChecked = false, ) { @@ -277,7 +279,7 @@ class GithubUtils { issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; }); diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index a5c8e8a2687f..a17c11a9c87c 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -533,7 +533,7 @@ describe('GithubUtils', () => { )); test('Test some verified internalQA PRs', () => ( - githubUtils.generateStagingDeployCashBody(tag, [...basePRList, ...internalQAPRList], [internalQAPRList[0]]) + githubUtils.generateStagingDeployCashBody(tag, [...basePRList, ...internalQAPRList], [], [], [], [], [internalQAPRList[0]]) .then((issueBody) => { expect(issueBody).toBe( `${baseExpectedOutput}` From 0c2f7df9d9db2c966db266b4a302c789c580e1b8 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Sat, 16 Jul 2022 18:01:12 +0100 Subject: [PATCH 02/12] Add missing comment for consistency --- .github/libs/GithubUtils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index 62d19e0220cb..5d7c219088c2 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -275,6 +275,7 @@ class GithubUtils { }); } + // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { From 2b4dded761f3a14a6e87291a5a60b31f312654a7 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Sat, 16 Jul 2022 18:14:52 +0100 Subject: [PATCH 03/12] Build the actions --- .../actions/javascript/awaitStagingDeploys/index.js | 5 ++++- .../actions/javascript/checkDeployBlockers/index.js | 5 ++++- .../javascript/createOrUpdateStagingDeploy/index.js | 12 +++++++++++- .../javascript/getPullRequestDetails/index.js | 5 ++++- .github/actions/javascript/getReleaseBody/index.js | 5 ++++- .../javascript/isPullRequestMergeable/index.js | 5 ++++- .../javascript/isStagingDeployLocked/index.js | 5 ++++- .../javascript/markPullRequestsAsDeployed/index.js | 5 ++++- .../javascript/reopenIssueWithComment/index.js | 5 ++++- .../javascript/triggerWorkflowAndWait/index.js | 5 ++++- .../actions/javascript/verifySignedCommits/index.js | 5 ++++- 11 files changed, 51 insertions(+), 11 deletions(-) diff --git a/.github/actions/javascript/awaitStagingDeploys/index.js b/.github/actions/javascript/awaitStagingDeploys/index.js index 728589d2a2b7..6b2301c45792 100644 --- a/.github/actions/javascript/awaitStagingDeploys/index.js +++ b/.github/actions/javascript/awaitStagingDeploys/index.js @@ -226,6 +226,7 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + internalQAPRList: this.getStagingDeployCashInternalQA(issue), isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, @@ -335,6 +336,7 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + resolvedInternalQAPRs = [], isTimingDashboardChecked = false, isFirebaseChecked = false, ) { @@ -390,11 +392,12 @@ class GithubUtils { }); } + // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; }); diff --git a/.github/actions/javascript/checkDeployBlockers/index.js b/.github/actions/javascript/checkDeployBlockers/index.js index 6d7c26639615..ee7f54907b72 100644 --- a/.github/actions/javascript/checkDeployBlockers/index.js +++ b/.github/actions/javascript/checkDeployBlockers/index.js @@ -196,6 +196,7 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + internalQAPRList: this.getStagingDeployCashInternalQA(issue), isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, @@ -305,6 +306,7 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + resolvedInternalQAPRs = [], isTimingDashboardChecked = false, isFirebaseChecked = false, ) { @@ -360,11 +362,12 @@ class GithubUtils { }); } + // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; }); diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index 97ea937ef3e9..f70117366229 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -132,6 +132,12 @@ const run = function () { 'number', ); + // Get the internalQA PR list, preserving the previous state of `isResolved` + const internalQAPRList = _.sortBy( + currentStagingDeployCashData.internalQAPRList, + 'number', + ); + return GithubUtils.generateStagingDeployCashBody( newTag, _.pluck(PRList, 'url'), @@ -139,6 +145,7 @@ const run = function () { _.pluck(_.where(PRList, {isAccessible: true}), 'url'), _.pluck(deployBlockers, 'url'), _.pluck(_.where(deployBlockers, {isResolved: true}), 'url'), + _.pluck(_.where(internalQAPRList, {isResolved: true}), 'url'), didVersionChange ? false : currentStagingDeployCashData.isTimingDashboardChecked, didVersionChange ? false : currentStagingDeployCashData.isFirebaseChecked, ); @@ -418,6 +425,7 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + internalQAPRList: this.getStagingDeployCashInternalQA(issue), isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, @@ -527,6 +535,7 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + resolvedInternalQAPRs = [], isTimingDashboardChecked = false, isFirebaseChecked = false, ) { @@ -582,11 +591,12 @@ class GithubUtils { }); } + // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; }); diff --git a/.github/actions/javascript/getPullRequestDetails/index.js b/.github/actions/javascript/getPullRequestDetails/index.js index 24262b7e6bd8..131db27359ef 100644 --- a/.github/actions/javascript/getPullRequestDetails/index.js +++ b/.github/actions/javascript/getPullRequestDetails/index.js @@ -267,6 +267,7 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + internalQAPRList: this.getStagingDeployCashInternalQA(issue), isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, @@ -376,6 +377,7 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + resolvedInternalQAPRs = [], isTimingDashboardChecked = false, isFirebaseChecked = false, ) { @@ -431,11 +433,12 @@ class GithubUtils { }); } + // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; }); diff --git a/.github/actions/javascript/getReleaseBody/index.js b/.github/actions/javascript/getReleaseBody/index.js index e69746d179bc..aafaa81bdbd5 100644 --- a/.github/actions/javascript/getReleaseBody/index.js +++ b/.github/actions/javascript/getReleaseBody/index.js @@ -185,6 +185,7 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + internalQAPRList: this.getStagingDeployCashInternalQA(issue), isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, @@ -294,6 +295,7 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + resolvedInternalQAPRs = [], isTimingDashboardChecked = false, isFirebaseChecked = false, ) { @@ -349,11 +351,12 @@ class GithubUtils { }); } + // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; }); diff --git a/.github/actions/javascript/isPullRequestMergeable/index.js b/.github/actions/javascript/isPullRequestMergeable/index.js index 6f240ac67571..50132d452536 100644 --- a/.github/actions/javascript/isPullRequestMergeable/index.js +++ b/.github/actions/javascript/isPullRequestMergeable/index.js @@ -217,6 +217,7 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + internalQAPRList: this.getStagingDeployCashInternalQA(issue), isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, @@ -326,6 +327,7 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + resolvedInternalQAPRs = [], isTimingDashboardChecked = false, isFirebaseChecked = false, ) { @@ -381,11 +383,12 @@ class GithubUtils { }); } + // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; }); diff --git a/.github/actions/javascript/isStagingDeployLocked/index.js b/.github/actions/javascript/isStagingDeployLocked/index.js index 4e6a8ba62535..c808afc467f1 100644 --- a/.github/actions/javascript/isStagingDeployLocked/index.js +++ b/.github/actions/javascript/isStagingDeployLocked/index.js @@ -149,6 +149,7 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + internalQAPRList: this.getStagingDeployCashInternalQA(issue), isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, @@ -258,6 +259,7 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + resolvedInternalQAPRs = [], isTimingDashboardChecked = false, isFirebaseChecked = false, ) { @@ -313,11 +315,12 @@ class GithubUtils { }); } + // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; }); diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/index.js b/.github/actions/javascript/markPullRequestsAsDeployed/index.js index 85d5a9495748..0fd80410c2ad 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/index.js +++ b/.github/actions/javascript/markPullRequestsAsDeployed/index.js @@ -318,6 +318,7 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + internalQAPRList: this.getStagingDeployCashInternalQA(issue), isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, @@ -427,6 +428,7 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + resolvedInternalQAPRs = [], isTimingDashboardChecked = false, isFirebaseChecked = false, ) { @@ -482,11 +484,12 @@ class GithubUtils { }); } + // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; }); diff --git a/.github/actions/javascript/reopenIssueWithComment/index.js b/.github/actions/javascript/reopenIssueWithComment/index.js index 98793c8e1e65..ba34452165f2 100644 --- a/.github/actions/javascript/reopenIssueWithComment/index.js +++ b/.github/actions/javascript/reopenIssueWithComment/index.js @@ -160,6 +160,7 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + internalQAPRList: this.getStagingDeployCashInternalQA(issue), isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, @@ -269,6 +270,7 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + resolvedInternalQAPRs = [], isTimingDashboardChecked = false, isFirebaseChecked = false, ) { @@ -324,11 +326,12 @@ class GithubUtils { }); } + // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; }); diff --git a/.github/actions/javascript/triggerWorkflowAndWait/index.js b/.github/actions/javascript/triggerWorkflowAndWait/index.js index d0b91a87baa9..5fe058a21729 100644 --- a/.github/actions/javascript/triggerWorkflowAndWait/index.js +++ b/.github/actions/javascript/triggerWorkflowAndWait/index.js @@ -329,6 +329,7 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + internalQAPRList: this.getStagingDeployCashInternalQA(issue), isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, @@ -438,6 +439,7 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + resolvedInternalQAPRs = [], isTimingDashboardChecked = false, isFirebaseChecked = false, ) { @@ -493,11 +495,12 @@ class GithubUtils { }); } + // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; }); diff --git a/.github/actions/javascript/verifySignedCommits/index.js b/.github/actions/javascript/verifySignedCommits/index.js index 48ad52700165..f9bda8d6ba38 100644 --- a/.github/actions/javascript/verifySignedCommits/index.js +++ b/.github/actions/javascript/verifySignedCommits/index.js @@ -149,6 +149,7 @@ class GithubUtils { labels: issue.labels, PRList: this.getStagingDeployCashPRList(issue), deployBlockers: this.getStagingDeployCashDeployBlockers(issue), + internalQAPRList: this.getStagingDeployCashInternalQA(issue), isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), tag, @@ -258,6 +259,7 @@ class GithubUtils { accessiblePRList = [], deployBlockers = [], resolvedDeployBlockers = [], + resolvedInternalQAPRs = [], isTimingDashboardChecked = false, isFirebaseChecked = false, ) { @@ -313,11 +315,12 @@ class GithubUtils { }); } + // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `\r\n${_.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'} `; + issueBody += `\r\n${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; issueBody += `${URL}`; issueBody += ` -${assigneeMentions}`; }); From 27031e108f9f76486c456198b7448fbbbc3afa43 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Sat, 16 Jul 2022 23:11:54 +0100 Subject: [PATCH 04/12] Build the actions after fixing linter --- .github/actions/javascript/awaitStagingDeploys/index.js | 1 + .github/actions/javascript/checkDeployBlockers/index.js | 1 + .github/actions/javascript/createOrUpdateStagingDeploy/index.js | 1 + .github/actions/javascript/getPullRequestDetails/index.js | 1 + .github/actions/javascript/getReleaseBody/index.js | 1 + .github/actions/javascript/isPullRequestMergeable/index.js | 1 + .github/actions/javascript/isStagingDeployLocked/index.js | 1 + .github/actions/javascript/markPullRequestsAsDeployed/index.js | 1 + .github/actions/javascript/reopenIssueWithComment/index.js | 1 + .github/actions/javascript/triggerWorkflowAndWait/index.js | 1 + .github/actions/javascript/verifySignedCommits/index.js | 1 + .github/libs/GithubUtils.js | 1 + 12 files changed, 12 insertions(+) diff --git a/.github/actions/javascript/awaitStagingDeploys/index.js b/.github/actions/javascript/awaitStagingDeploys/index.js index 6b2301c45792..b0d3a0dd3263 100644 --- a/.github/actions/javascript/awaitStagingDeploys/index.js +++ b/.github/actions/javascript/awaitStagingDeploys/index.js @@ -325,6 +325,7 @@ 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 {Array} [resolvedInternalQAPRs] - The list of Internal QA PR URLs which have been resolved. * @param {Boolean} [isTimingDashboardChecked] * @param {Boolean} [isFirebaseChecked] * @returns {Promise} diff --git a/.github/actions/javascript/checkDeployBlockers/index.js b/.github/actions/javascript/checkDeployBlockers/index.js index ee7f54907b72..1ec9d0cda8f4 100644 --- a/.github/actions/javascript/checkDeployBlockers/index.js +++ b/.github/actions/javascript/checkDeployBlockers/index.js @@ -295,6 +295,7 @@ 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 {Array} [resolvedInternalQAPRs] - The list of Internal QA PR URLs which have been resolved. * @param {Boolean} [isTimingDashboardChecked] * @param {Boolean} [isFirebaseChecked] * @returns {Promise} diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index f70117366229..b3c27869ef89 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -524,6 +524,7 @@ 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 {Array} [resolvedInternalQAPRs] - The list of Internal QA PR URLs which have been resolved. * @param {Boolean} [isTimingDashboardChecked] * @param {Boolean} [isFirebaseChecked] * @returns {Promise} diff --git a/.github/actions/javascript/getPullRequestDetails/index.js b/.github/actions/javascript/getPullRequestDetails/index.js index 131db27359ef..35edc9677c4a 100644 --- a/.github/actions/javascript/getPullRequestDetails/index.js +++ b/.github/actions/javascript/getPullRequestDetails/index.js @@ -366,6 +366,7 @@ 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 {Array} [resolvedInternalQAPRs] - The list of Internal QA PR URLs which have been resolved. * @param {Boolean} [isTimingDashboardChecked] * @param {Boolean} [isFirebaseChecked] * @returns {Promise} diff --git a/.github/actions/javascript/getReleaseBody/index.js b/.github/actions/javascript/getReleaseBody/index.js index aafaa81bdbd5..2ffd37279998 100644 --- a/.github/actions/javascript/getReleaseBody/index.js +++ b/.github/actions/javascript/getReleaseBody/index.js @@ -284,6 +284,7 @@ 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 {Array} [resolvedInternalQAPRs] - The list of Internal QA PR URLs which have been resolved. * @param {Boolean} [isTimingDashboardChecked] * @param {Boolean} [isFirebaseChecked] * @returns {Promise} diff --git a/.github/actions/javascript/isPullRequestMergeable/index.js b/.github/actions/javascript/isPullRequestMergeable/index.js index 50132d452536..64e58af41896 100644 --- a/.github/actions/javascript/isPullRequestMergeable/index.js +++ b/.github/actions/javascript/isPullRequestMergeable/index.js @@ -316,6 +316,7 @@ 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 {Array} [resolvedInternalQAPRs] - The list of Internal QA PR URLs which have been resolved. * @param {Boolean} [isTimingDashboardChecked] * @param {Boolean} [isFirebaseChecked] * @returns {Promise} diff --git a/.github/actions/javascript/isStagingDeployLocked/index.js b/.github/actions/javascript/isStagingDeployLocked/index.js index c808afc467f1..b790441701e3 100644 --- a/.github/actions/javascript/isStagingDeployLocked/index.js +++ b/.github/actions/javascript/isStagingDeployLocked/index.js @@ -248,6 +248,7 @@ 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 {Array} [resolvedInternalQAPRs] - The list of Internal QA PR URLs which have been resolved. * @param {Boolean} [isTimingDashboardChecked] * @param {Boolean} [isFirebaseChecked] * @returns {Promise} diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/index.js b/.github/actions/javascript/markPullRequestsAsDeployed/index.js index 0fd80410c2ad..d4d06c189f3e 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/index.js +++ b/.github/actions/javascript/markPullRequestsAsDeployed/index.js @@ -417,6 +417,7 @@ 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 {Array} [resolvedInternalQAPRs] - The list of Internal QA PR URLs which have been resolved. * @param {Boolean} [isTimingDashboardChecked] * @param {Boolean} [isFirebaseChecked] * @returns {Promise} diff --git a/.github/actions/javascript/reopenIssueWithComment/index.js b/.github/actions/javascript/reopenIssueWithComment/index.js index ba34452165f2..84c7f219aed6 100644 --- a/.github/actions/javascript/reopenIssueWithComment/index.js +++ b/.github/actions/javascript/reopenIssueWithComment/index.js @@ -259,6 +259,7 @@ 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 {Array} [resolvedInternalQAPRs] - The list of Internal QA PR URLs which have been resolved. * @param {Boolean} [isTimingDashboardChecked] * @param {Boolean} [isFirebaseChecked] * @returns {Promise} diff --git a/.github/actions/javascript/triggerWorkflowAndWait/index.js b/.github/actions/javascript/triggerWorkflowAndWait/index.js index 5fe058a21729..1d746d5c3442 100644 --- a/.github/actions/javascript/triggerWorkflowAndWait/index.js +++ b/.github/actions/javascript/triggerWorkflowAndWait/index.js @@ -428,6 +428,7 @@ 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 {Array} [resolvedInternalQAPRs] - The list of Internal QA PR URLs which have been resolved. * @param {Boolean} [isTimingDashboardChecked] * @param {Boolean} [isFirebaseChecked] * @returns {Promise} diff --git a/.github/actions/javascript/verifySignedCommits/index.js b/.github/actions/javascript/verifySignedCommits/index.js index f9bda8d6ba38..1f7a52cc7aed 100644 --- a/.github/actions/javascript/verifySignedCommits/index.js +++ b/.github/actions/javascript/verifySignedCommits/index.js @@ -248,6 +248,7 @@ 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 {Array} [resolvedInternalQAPRs] - The list of Internal QA PR URLs which have been resolved. * @param {Boolean} [isTimingDashboardChecked] * @param {Boolean} [isFirebaseChecked] * @returns {Promise} diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index 5d7c219088c2..70265790f0ef 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -208,6 +208,7 @@ 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 {Array} [resolvedInternalQAPRs] - The list of Internal QA PR URLs which have been resolved. * @param {Boolean} [isTimingDashboardChecked] * @param {Boolean} [isFirebaseChecked] * @returns {Promise} From e8accc9def2ac8fe04b1217b61c91b6df627bd91 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Sat, 16 Jul 2022 23:40:33 +0100 Subject: [PATCH 05/12] Update the test --- tests/unit/GithubUtilsTest.js | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index a17c11a9c87c..1c671161d7dd 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -68,6 +68,7 @@ describe('GithubUtils', () => { url: 'https://api.github.com/repos/Andrew-Test-Org/Public-Test-Repo/issues/29', number: 29, deployBlockers: [], + internalQAPRList: [], isTimingDashboardChecked: false, isFirebaseChecked: false, }; From 8b8f8565f189fdcee0219d414067bf55c992bb23 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Sun, 17 Jul 2022 02:30:31 +0100 Subject: [PATCH 06/12] Add once console log for debugging --- .github/actions/javascript/awaitStagingDeploys/index.js | 1 + .github/actions/javascript/checkDeployBlockers/index.js | 1 + .github/actions/javascript/createOrUpdateStagingDeploy/index.js | 1 + .github/actions/javascript/getPullRequestDetails/index.js | 1 + .github/actions/javascript/getReleaseBody/index.js | 1 + .github/actions/javascript/isPullRequestMergeable/index.js | 1 + .github/actions/javascript/isStagingDeployLocked/index.js | 1 + .github/actions/javascript/markPullRequestsAsDeployed/index.js | 1 + .github/actions/javascript/reopenIssueWithComment/index.js | 1 + .github/actions/javascript/triggerWorkflowAndWait/index.js | 1 + .github/actions/javascript/verifySignedCommits/index.js | 1 + .github/libs/GithubUtils.js | 1 + 12 files changed, 12 insertions(+) diff --git a/.github/actions/javascript/awaitStagingDeploys/index.js b/.github/actions/javascript/awaitStagingDeploys/index.js index b0d3a0dd3263..a65ae5e45bb0 100644 --- a/.github/actions/javascript/awaitStagingDeploys/index.js +++ b/.github/actions/javascript/awaitStagingDeploys/index.js @@ -395,6 +395,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { + console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/actions/javascript/checkDeployBlockers/index.js b/.github/actions/javascript/checkDeployBlockers/index.js index 1ec9d0cda8f4..76c75fa9ef2b 100644 --- a/.github/actions/javascript/checkDeployBlockers/index.js +++ b/.github/actions/javascript/checkDeployBlockers/index.js @@ -365,6 +365,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { + console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index b3c27869ef89..c84699a1d982 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -594,6 +594,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { + console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/actions/javascript/getPullRequestDetails/index.js b/.github/actions/javascript/getPullRequestDetails/index.js index 35edc9677c4a..860a4427f5a8 100644 --- a/.github/actions/javascript/getPullRequestDetails/index.js +++ b/.github/actions/javascript/getPullRequestDetails/index.js @@ -436,6 +436,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { + console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/actions/javascript/getReleaseBody/index.js b/.github/actions/javascript/getReleaseBody/index.js index 2ffd37279998..937ea1cc6026 100644 --- a/.github/actions/javascript/getReleaseBody/index.js +++ b/.github/actions/javascript/getReleaseBody/index.js @@ -354,6 +354,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { + console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/actions/javascript/isPullRequestMergeable/index.js b/.github/actions/javascript/isPullRequestMergeable/index.js index 64e58af41896..c50d071fcde9 100644 --- a/.github/actions/javascript/isPullRequestMergeable/index.js +++ b/.github/actions/javascript/isPullRequestMergeable/index.js @@ -386,6 +386,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { + console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/actions/javascript/isStagingDeployLocked/index.js b/.github/actions/javascript/isStagingDeployLocked/index.js index b790441701e3..b6a880ba57cb 100644 --- a/.github/actions/javascript/isStagingDeployLocked/index.js +++ b/.github/actions/javascript/isStagingDeployLocked/index.js @@ -318,6 +318,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { + console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/index.js b/.github/actions/javascript/markPullRequestsAsDeployed/index.js index d4d06c189f3e..09b3d5b44e8e 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/index.js +++ b/.github/actions/javascript/markPullRequestsAsDeployed/index.js @@ -487,6 +487,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { + console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/actions/javascript/reopenIssueWithComment/index.js b/.github/actions/javascript/reopenIssueWithComment/index.js index 84c7f219aed6..eed7e95eb06a 100644 --- a/.github/actions/javascript/reopenIssueWithComment/index.js +++ b/.github/actions/javascript/reopenIssueWithComment/index.js @@ -329,6 +329,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { + console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/actions/javascript/triggerWorkflowAndWait/index.js b/.github/actions/javascript/triggerWorkflowAndWait/index.js index 1d746d5c3442..9604f7538607 100644 --- a/.github/actions/javascript/triggerWorkflowAndWait/index.js +++ b/.github/actions/javascript/triggerWorkflowAndWait/index.js @@ -498,6 +498,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { + console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/actions/javascript/verifySignedCommits/index.js b/.github/actions/javascript/verifySignedCommits/index.js index 1f7a52cc7aed..796c4f958e71 100644 --- a/.github/actions/javascript/verifySignedCommits/index.js +++ b/.github/actions/javascript/verifySignedCommits/index.js @@ -318,6 +318,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { + console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index 70265790f0ef..c209ab4b3469 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -278,6 +278,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { + console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); From 0997c5fc75919e7043c002133c4b0bd9307944f4 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Sun, 17 Jul 2022 02:32:18 +0100 Subject: [PATCH 07/12] Update the console comment --- .github/actions/javascript/awaitStagingDeploys/index.js | 2 +- .github/actions/javascript/checkDeployBlockers/index.js | 2 +- .github/actions/javascript/createOrUpdateStagingDeploy/index.js | 2 +- .github/actions/javascript/getPullRequestDetails/index.js | 2 +- .github/actions/javascript/getReleaseBody/index.js | 2 +- .github/actions/javascript/isPullRequestMergeable/index.js | 2 +- .github/actions/javascript/isStagingDeployLocked/index.js | 2 +- .github/actions/javascript/markPullRequestsAsDeployed/index.js | 2 +- .github/actions/javascript/reopenIssueWithComment/index.js | 2 +- .github/actions/javascript/triggerWorkflowAndWait/index.js | 2 +- .github/actions/javascript/verifySignedCommits/index.js | 2 +- .github/libs/GithubUtils.js | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/actions/javascript/awaitStagingDeploys/index.js b/.github/actions/javascript/awaitStagingDeploys/index.js index a65ae5e45bb0..1b9125b6c673 100644 --- a/.github/actions/javascript/awaitStagingDeploys/index.js +++ b/.github/actions/javascript/awaitStagingDeploys/index.js @@ -395,7 +395,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { - console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); + console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/actions/javascript/checkDeployBlockers/index.js b/.github/actions/javascript/checkDeployBlockers/index.js index 76c75fa9ef2b..bbfeace85706 100644 --- a/.github/actions/javascript/checkDeployBlockers/index.js +++ b/.github/actions/javascript/checkDeployBlockers/index.js @@ -365,7 +365,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { - console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); + console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index c84699a1d982..13a233c694f7 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -594,7 +594,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { - console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); + console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/actions/javascript/getPullRequestDetails/index.js b/.github/actions/javascript/getPullRequestDetails/index.js index 860a4427f5a8..b1bc65f492ea 100644 --- a/.github/actions/javascript/getPullRequestDetails/index.js +++ b/.github/actions/javascript/getPullRequestDetails/index.js @@ -436,7 +436,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { - console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); + console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/actions/javascript/getReleaseBody/index.js b/.github/actions/javascript/getReleaseBody/index.js index 937ea1cc6026..8508fe32b9ac 100644 --- a/.github/actions/javascript/getReleaseBody/index.js +++ b/.github/actions/javascript/getReleaseBody/index.js @@ -354,7 +354,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { - console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); + console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/actions/javascript/isPullRequestMergeable/index.js b/.github/actions/javascript/isPullRequestMergeable/index.js index c50d071fcde9..b938f745f268 100644 --- a/.github/actions/javascript/isPullRequestMergeable/index.js +++ b/.github/actions/javascript/isPullRequestMergeable/index.js @@ -386,7 +386,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { - console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); + console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/actions/javascript/isStagingDeployLocked/index.js b/.github/actions/javascript/isStagingDeployLocked/index.js index b6a880ba57cb..7ac0e0f51492 100644 --- a/.github/actions/javascript/isStagingDeployLocked/index.js +++ b/.github/actions/javascript/isStagingDeployLocked/index.js @@ -318,7 +318,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { - console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); + console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/index.js b/.github/actions/javascript/markPullRequestsAsDeployed/index.js index 09b3d5b44e8e..e82afd897086 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/index.js +++ b/.github/actions/javascript/markPullRequestsAsDeployed/index.js @@ -487,7 +487,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { - console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); + console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/actions/javascript/reopenIssueWithComment/index.js b/.github/actions/javascript/reopenIssueWithComment/index.js index eed7e95eb06a..4f03ca1b2662 100644 --- a/.github/actions/javascript/reopenIssueWithComment/index.js +++ b/.github/actions/javascript/reopenIssueWithComment/index.js @@ -329,7 +329,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { - console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); + console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/actions/javascript/triggerWorkflowAndWait/index.js b/.github/actions/javascript/triggerWorkflowAndWait/index.js index 9604f7538607..3a9bd51b7083 100644 --- a/.github/actions/javascript/triggerWorkflowAndWait/index.js +++ b/.github/actions/javascript/triggerWorkflowAndWait/index.js @@ -498,7 +498,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { - console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); + console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/actions/javascript/verifySignedCommits/index.js b/.github/actions/javascript/verifySignedCommits/index.js index 796c4f958e71..b8837dd7e154 100644 --- a/.github/actions/javascript/verifySignedCommits/index.js +++ b/.github/actions/javascript/verifySignedCommits/index.js @@ -318,7 +318,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { - console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); + console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index c209ab4b3469..555ec9cdd6b6 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -278,7 +278,7 @@ class GithubUtils { // Internal QA PR list if (!_.isEmpty(internalQAPRMap)) { - console.log('The already resolved internalQA PRs found are:', resolvedInternalQAPRs); + console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); issueBody += '\r\n\r\n\r\n**Internal QA:**'; _.each(internalQAPRMap, (assignees, URL) => { const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); From 5077a276d4af0d193f195262d438f2ad10278954 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Tue, 19 Jul 2022 13:37:50 +0100 Subject: [PATCH 08/12] Fix the PR numbers difference --- .github/libs/GithubUtils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index 555ec9cdd6b6..e997d22a2772 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -250,10 +250,11 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); + const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(_.keys(internalQAPRMap)) + .difference(internalQAPRsNumbers) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); From 835ec16248ee0da941de1c66dc8d080d7d2237c4 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Tue, 19 Jul 2022 13:40:03 +0100 Subject: [PATCH 09/12] Add a comment explaining a shape of the map --- .github/libs/GithubUtils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index e997d22a2772..69047e46e0d5 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -232,6 +232,9 @@ class GithubUtils { ); console.log('Filtering out the following automated pull requests:', automatedPRs); + // The format of this map is following: + // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { From 6c8ab931a6dc8395476b9f42aaf9d66ec5a7e858 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Tue, 19 Jul 2022 13:40:29 +0100 Subject: [PATCH 10/12] Build the action --- .github/actions/javascript/awaitStagingDeploys/index.js | 6 +++++- .github/actions/javascript/checkDeployBlockers/index.js | 6 +++++- .../actions/javascript/createOrUpdateStagingDeploy/index.js | 6 +++++- .github/actions/javascript/getPullRequestDetails/index.js | 6 +++++- .github/actions/javascript/getReleaseBody/index.js | 6 +++++- .github/actions/javascript/isPullRequestMergeable/index.js | 6 +++++- .github/actions/javascript/isStagingDeployLocked/index.js | 6 +++++- .../actions/javascript/markPullRequestsAsDeployed/index.js | 6 +++++- .github/actions/javascript/reopenIssueWithComment/index.js | 6 +++++- .github/actions/javascript/triggerWorkflowAndWait/index.js | 6 +++++- .github/actions/javascript/verifySignedCommits/index.js | 6 +++++- 11 files changed, 55 insertions(+), 11 deletions(-) diff --git a/.github/actions/javascript/awaitStagingDeploys/index.js b/.github/actions/javascript/awaitStagingDeploys/index.js index 1b9125b6c673..9c294cc176f5 100644 --- a/.github/actions/javascript/awaitStagingDeploys/index.js +++ b/.github/actions/javascript/awaitStagingDeploys/index.js @@ -349,6 +349,9 @@ class GithubUtils { ); console.log('Filtering out the following automated pull requests:', automatedPRs); + // The format of this map is following: + // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { @@ -367,10 +370,11 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); + const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(_.keys(internalQAPRMap)) + .difference(internalQAPRsNumbers) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); diff --git a/.github/actions/javascript/checkDeployBlockers/index.js b/.github/actions/javascript/checkDeployBlockers/index.js index bbfeace85706..1da153b209cc 100644 --- a/.github/actions/javascript/checkDeployBlockers/index.js +++ b/.github/actions/javascript/checkDeployBlockers/index.js @@ -319,6 +319,9 @@ class GithubUtils { ); console.log('Filtering out the following automated pull requests:', automatedPRs); + // The format of this map is following: + // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { @@ -337,10 +340,11 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); + const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(_.keys(internalQAPRMap)) + .difference(internalQAPRsNumbers) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index 13a233c694f7..3b32c7813cfd 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -548,6 +548,9 @@ class GithubUtils { ); console.log('Filtering out the following automated pull requests:', automatedPRs); + // The format of this map is following: + // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { @@ -566,10 +569,11 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); + const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(_.keys(internalQAPRMap)) + .difference(internalQAPRsNumbers) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); diff --git a/.github/actions/javascript/getPullRequestDetails/index.js b/.github/actions/javascript/getPullRequestDetails/index.js index b1bc65f492ea..76b532cc2174 100644 --- a/.github/actions/javascript/getPullRequestDetails/index.js +++ b/.github/actions/javascript/getPullRequestDetails/index.js @@ -390,6 +390,9 @@ class GithubUtils { ); console.log('Filtering out the following automated pull requests:', automatedPRs); + // The format of this map is following: + // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { @@ -408,10 +411,11 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); + const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(_.keys(internalQAPRMap)) + .difference(internalQAPRsNumbers) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); diff --git a/.github/actions/javascript/getReleaseBody/index.js b/.github/actions/javascript/getReleaseBody/index.js index 8508fe32b9ac..8a55a578e409 100644 --- a/.github/actions/javascript/getReleaseBody/index.js +++ b/.github/actions/javascript/getReleaseBody/index.js @@ -308,6 +308,9 @@ class GithubUtils { ); console.log('Filtering out the following automated pull requests:', automatedPRs); + // The format of this map is following: + // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { @@ -326,10 +329,11 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); + const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(_.keys(internalQAPRMap)) + .difference(internalQAPRsNumbers) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); diff --git a/.github/actions/javascript/isPullRequestMergeable/index.js b/.github/actions/javascript/isPullRequestMergeable/index.js index b938f745f268..ca82eff591ec 100644 --- a/.github/actions/javascript/isPullRequestMergeable/index.js +++ b/.github/actions/javascript/isPullRequestMergeable/index.js @@ -340,6 +340,9 @@ class GithubUtils { ); console.log('Filtering out the following automated pull requests:', automatedPRs); + // The format of this map is following: + // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { @@ -358,10 +361,11 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); + const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(_.keys(internalQAPRMap)) + .difference(internalQAPRsNumbers) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); diff --git a/.github/actions/javascript/isStagingDeployLocked/index.js b/.github/actions/javascript/isStagingDeployLocked/index.js index 7ac0e0f51492..fa416c70688e 100644 --- a/.github/actions/javascript/isStagingDeployLocked/index.js +++ b/.github/actions/javascript/isStagingDeployLocked/index.js @@ -272,6 +272,9 @@ class GithubUtils { ); console.log('Filtering out the following automated pull requests:', automatedPRs); + // The format of this map is following: + // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { @@ -290,10 +293,11 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); + const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(_.keys(internalQAPRMap)) + .difference(internalQAPRsNumbers) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/index.js b/.github/actions/javascript/markPullRequestsAsDeployed/index.js index e82afd897086..e8437f34959e 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/index.js +++ b/.github/actions/javascript/markPullRequestsAsDeployed/index.js @@ -441,6 +441,9 @@ class GithubUtils { ); console.log('Filtering out the following automated pull requests:', automatedPRs); + // The format of this map is following: + // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { @@ -459,10 +462,11 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); + const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(_.keys(internalQAPRMap)) + .difference(internalQAPRsNumbers) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); diff --git a/.github/actions/javascript/reopenIssueWithComment/index.js b/.github/actions/javascript/reopenIssueWithComment/index.js index 4f03ca1b2662..6a872b4b4bd0 100644 --- a/.github/actions/javascript/reopenIssueWithComment/index.js +++ b/.github/actions/javascript/reopenIssueWithComment/index.js @@ -283,6 +283,9 @@ class GithubUtils { ); console.log('Filtering out the following automated pull requests:', automatedPRs); + // The format of this map is following: + // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { @@ -301,10 +304,11 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); + const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(_.keys(internalQAPRMap)) + .difference(internalQAPRsNumbers) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); diff --git a/.github/actions/javascript/triggerWorkflowAndWait/index.js b/.github/actions/javascript/triggerWorkflowAndWait/index.js index 3a9bd51b7083..cb443c670709 100644 --- a/.github/actions/javascript/triggerWorkflowAndWait/index.js +++ b/.github/actions/javascript/triggerWorkflowAndWait/index.js @@ -452,6 +452,9 @@ class GithubUtils { ); console.log('Filtering out the following automated pull requests:', automatedPRs); + // The format of this map is following: + // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { @@ -470,10 +473,11 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); + const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(_.keys(internalQAPRMap)) + .difference(internalQAPRsNumbers) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); diff --git a/.github/actions/javascript/verifySignedCommits/index.js b/.github/actions/javascript/verifySignedCommits/index.js index b8837dd7e154..134229be592c 100644 --- a/.github/actions/javascript/verifySignedCommits/index.js +++ b/.github/actions/javascript/verifySignedCommits/index.js @@ -272,6 +272,9 @@ class GithubUtils { ); console.log('Filtering out the following automated pull requests:', automatedPRs); + // The format of this map is following: + // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { @@ -290,10 +293,11 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); + const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(_.keys(internalQAPRMap)) + .difference(internalQAPRsNumbers) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); From c25773add9ed9adcf26f1681eb10f85f4e9b3def Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Tue, 19 Jul 2022 13:43:09 +0100 Subject: [PATCH 11/12] Make the comment more readable --- .github/actions/javascript/awaitStagingDeploys/index.js | 6 ++++-- .github/actions/javascript/checkDeployBlockers/index.js | 6 ++++-- .../actions/javascript/createOrUpdateStagingDeploy/index.js | 6 ++++-- .github/actions/javascript/getPullRequestDetails/index.js | 6 ++++-- .github/actions/javascript/getReleaseBody/index.js | 6 ++++-- .github/actions/javascript/isPullRequestMergeable/index.js | 6 ++++-- .github/actions/javascript/isStagingDeployLocked/index.js | 6 ++++-- .../actions/javascript/markPullRequestsAsDeployed/index.js | 6 ++++-- .github/actions/javascript/reopenIssueWithComment/index.js | 6 ++++-- .github/actions/javascript/triggerWorkflowAndWait/index.js | 6 ++++-- .github/actions/javascript/verifySignedCommits/index.js | 6 ++++-- .github/libs/GithubUtils.js | 6 ++++-- 12 files changed, 48 insertions(+), 24 deletions(-) diff --git a/.github/actions/javascript/awaitStagingDeploys/index.js b/.github/actions/javascript/awaitStagingDeploys/index.js index 9c294cc176f5..2985920a6ade 100644 --- a/.github/actions/javascript/awaitStagingDeploys/index.js +++ b/.github/actions/javascript/awaitStagingDeploys/index.js @@ -350,8 +350,10 @@ class GithubUtils { console.log('Filtering out the following automated pull requests:', automatedPRs); // The format of this map is following: - // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], - // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } + // { + // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] + // } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { diff --git a/.github/actions/javascript/checkDeployBlockers/index.js b/.github/actions/javascript/checkDeployBlockers/index.js index 1da153b209cc..a7701015e4d2 100644 --- a/.github/actions/javascript/checkDeployBlockers/index.js +++ b/.github/actions/javascript/checkDeployBlockers/index.js @@ -320,8 +320,10 @@ class GithubUtils { console.log('Filtering out the following automated pull requests:', automatedPRs); // The format of this map is following: - // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], - // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } + // { + // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] + // } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index 3b32c7813cfd..a622fbdfde16 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -549,8 +549,10 @@ class GithubUtils { console.log('Filtering out the following automated pull requests:', automatedPRs); // The format of this map is following: - // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], - // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } + // { + // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] + // } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { diff --git a/.github/actions/javascript/getPullRequestDetails/index.js b/.github/actions/javascript/getPullRequestDetails/index.js index 76b532cc2174..a9ccebd94355 100644 --- a/.github/actions/javascript/getPullRequestDetails/index.js +++ b/.github/actions/javascript/getPullRequestDetails/index.js @@ -391,8 +391,10 @@ class GithubUtils { console.log('Filtering out the following automated pull requests:', automatedPRs); // The format of this map is following: - // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], - // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } + // { + // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] + // } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { diff --git a/.github/actions/javascript/getReleaseBody/index.js b/.github/actions/javascript/getReleaseBody/index.js index 8a55a578e409..9ac9d36bfe83 100644 --- a/.github/actions/javascript/getReleaseBody/index.js +++ b/.github/actions/javascript/getReleaseBody/index.js @@ -309,8 +309,10 @@ class GithubUtils { console.log('Filtering out the following automated pull requests:', automatedPRs); // The format of this map is following: - // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], - // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } + // { + // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] + // } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { diff --git a/.github/actions/javascript/isPullRequestMergeable/index.js b/.github/actions/javascript/isPullRequestMergeable/index.js index ca82eff591ec..27236799324e 100644 --- a/.github/actions/javascript/isPullRequestMergeable/index.js +++ b/.github/actions/javascript/isPullRequestMergeable/index.js @@ -341,8 +341,10 @@ class GithubUtils { console.log('Filtering out the following automated pull requests:', automatedPRs); // The format of this map is following: - // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], - // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } + // { + // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] + // } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { diff --git a/.github/actions/javascript/isStagingDeployLocked/index.js b/.github/actions/javascript/isStagingDeployLocked/index.js index fa416c70688e..6f2675868735 100644 --- a/.github/actions/javascript/isStagingDeployLocked/index.js +++ b/.github/actions/javascript/isStagingDeployLocked/index.js @@ -273,8 +273,10 @@ class GithubUtils { console.log('Filtering out the following automated pull requests:', automatedPRs); // The format of this map is following: - // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], - // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } + // { + // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] + // } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/index.js b/.github/actions/javascript/markPullRequestsAsDeployed/index.js index e8437f34959e..c9d757b001fa 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/index.js +++ b/.github/actions/javascript/markPullRequestsAsDeployed/index.js @@ -442,8 +442,10 @@ class GithubUtils { console.log('Filtering out the following automated pull requests:', automatedPRs); // The format of this map is following: - // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], - // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } + // { + // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] + // } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { diff --git a/.github/actions/javascript/reopenIssueWithComment/index.js b/.github/actions/javascript/reopenIssueWithComment/index.js index 6a872b4b4bd0..5d10b9d59fc6 100644 --- a/.github/actions/javascript/reopenIssueWithComment/index.js +++ b/.github/actions/javascript/reopenIssueWithComment/index.js @@ -284,8 +284,10 @@ class GithubUtils { console.log('Filtering out the following automated pull requests:', automatedPRs); // The format of this map is following: - // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], - // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } + // { + // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] + // } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { diff --git a/.github/actions/javascript/triggerWorkflowAndWait/index.js b/.github/actions/javascript/triggerWorkflowAndWait/index.js index cb443c670709..513c3e90fc2a 100644 --- a/.github/actions/javascript/triggerWorkflowAndWait/index.js +++ b/.github/actions/javascript/triggerWorkflowAndWait/index.js @@ -453,8 +453,10 @@ class GithubUtils { console.log('Filtering out the following automated pull requests:', automatedPRs); // The format of this map is following: - // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], - // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } + // { + // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] + // } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { diff --git a/.github/actions/javascript/verifySignedCommits/index.js b/.github/actions/javascript/verifySignedCommits/index.js index 134229be592c..9a45d951a369 100644 --- a/.github/actions/javascript/verifySignedCommits/index.js +++ b/.github/actions/javascript/verifySignedCommits/index.js @@ -273,8 +273,10 @@ class GithubUtils { console.log('Filtering out the following automated pull requests:', automatedPRs); // The format of this map is following: - // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], - // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } + // { + // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] + // } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index 69047e46e0d5..9d5d2b1fd646 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -233,8 +233,10 @@ class GithubUtils { console.log('Filtering out the following automated pull requests:', automatedPRs); // The format of this map is following: - // { 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], - // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] } + // { + // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], + // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] + // } const internalQAPRMap = _.reduce( _.filter(data, pr => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), (map, pr) => { From beeefb2664e7b6c9dc35786643c3d96861c366fc Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Tue, 19 Jul 2022 14:46:19 +0100 Subject: [PATCH 12/12] Fix the bug with internalQA PRs appearing twice --- .github/actions/javascript/awaitStagingDeploys/index.js | 6 ++---- .github/actions/javascript/checkDeployBlockers/index.js | 6 ++---- .../actions/javascript/createOrUpdateStagingDeploy/index.js | 6 ++---- .github/actions/javascript/getPullRequestDetails/index.js | 6 ++---- .github/actions/javascript/getReleaseBody/index.js | 6 ++---- .github/actions/javascript/isPullRequestMergeable/index.js | 6 ++---- .github/actions/javascript/isStagingDeployLocked/index.js | 6 ++---- .../actions/javascript/markPullRequestsAsDeployed/index.js | 6 ++---- .github/actions/javascript/reopenIssueWithComment/index.js | 6 ++---- .github/actions/javascript/triggerWorkflowAndWait/index.js | 6 ++---- .github/actions/javascript/verifySignedCommits/index.js | 6 ++---- .github/libs/GithubUtils.js | 6 ++---- 12 files changed, 24 insertions(+), 48 deletions(-) diff --git a/.github/actions/javascript/awaitStagingDeploys/index.js b/.github/actions/javascript/awaitStagingDeploys/index.js index 2985920a6ade..7fed9b6634a6 100644 --- a/.github/actions/javascript/awaitStagingDeploys/index.js +++ b/.github/actions/javascript/awaitStagingDeploys/index.js @@ -261,8 +261,7 @@ class GithubUtils { isAccessible: match[4] === 'x', }), ); - const internalQAPRList = this.getStagingDeployCashInternalQA(issue); - return _.sortBy(_.union(PRList, internalQAPRList), 'number'); + return _.sortBy(PRList, 'number'); } /** @@ -372,11 +371,10 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); - const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(internalQAPRsNumbers) + .difference(_.keys(internalQAPRMap)) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); diff --git a/.github/actions/javascript/checkDeployBlockers/index.js b/.github/actions/javascript/checkDeployBlockers/index.js index a7701015e4d2..849ed857aa1a 100644 --- a/.github/actions/javascript/checkDeployBlockers/index.js +++ b/.github/actions/javascript/checkDeployBlockers/index.js @@ -231,8 +231,7 @@ class GithubUtils { isAccessible: match[4] === 'x', }), ); - const internalQAPRList = this.getStagingDeployCashInternalQA(issue); - return _.sortBy(_.union(PRList, internalQAPRList), 'number'); + return _.sortBy(PRList, 'number'); } /** @@ -342,11 +341,10 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); - const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(internalQAPRsNumbers) + .difference(_.keys(internalQAPRMap)) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index a622fbdfde16..d5b896adeac4 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -460,8 +460,7 @@ class GithubUtils { isAccessible: match[4] === 'x', }), ); - const internalQAPRList = this.getStagingDeployCashInternalQA(issue); - return _.sortBy(_.union(PRList, internalQAPRList), 'number'); + return _.sortBy(PRList, 'number'); } /** @@ -571,11 +570,10 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); - const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(internalQAPRsNumbers) + .difference(_.keys(internalQAPRMap)) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); diff --git a/.github/actions/javascript/getPullRequestDetails/index.js b/.github/actions/javascript/getPullRequestDetails/index.js index a9ccebd94355..8b364f228efe 100644 --- a/.github/actions/javascript/getPullRequestDetails/index.js +++ b/.github/actions/javascript/getPullRequestDetails/index.js @@ -302,8 +302,7 @@ class GithubUtils { isAccessible: match[4] === 'x', }), ); - const internalQAPRList = this.getStagingDeployCashInternalQA(issue); - return _.sortBy(_.union(PRList, internalQAPRList), 'number'); + return _.sortBy(PRList, 'number'); } /** @@ -413,11 +412,10 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); - const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(internalQAPRsNumbers) + .difference(_.keys(internalQAPRMap)) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); diff --git a/.github/actions/javascript/getReleaseBody/index.js b/.github/actions/javascript/getReleaseBody/index.js index 9ac9d36bfe83..14779cdcf7ca 100644 --- a/.github/actions/javascript/getReleaseBody/index.js +++ b/.github/actions/javascript/getReleaseBody/index.js @@ -220,8 +220,7 @@ class GithubUtils { isAccessible: match[4] === 'x', }), ); - const internalQAPRList = this.getStagingDeployCashInternalQA(issue); - return _.sortBy(_.union(PRList, internalQAPRList), 'number'); + return _.sortBy(PRList, 'number'); } /** @@ -331,11 +330,10 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); - const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(internalQAPRsNumbers) + .difference(_.keys(internalQAPRMap)) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); diff --git a/.github/actions/javascript/isPullRequestMergeable/index.js b/.github/actions/javascript/isPullRequestMergeable/index.js index 27236799324e..714c0705137b 100644 --- a/.github/actions/javascript/isPullRequestMergeable/index.js +++ b/.github/actions/javascript/isPullRequestMergeable/index.js @@ -252,8 +252,7 @@ class GithubUtils { isAccessible: match[4] === 'x', }), ); - const internalQAPRList = this.getStagingDeployCashInternalQA(issue); - return _.sortBy(_.union(PRList, internalQAPRList), 'number'); + return _.sortBy(PRList, 'number'); } /** @@ -363,11 +362,10 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); - const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(internalQAPRsNumbers) + .difference(_.keys(internalQAPRMap)) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); diff --git a/.github/actions/javascript/isStagingDeployLocked/index.js b/.github/actions/javascript/isStagingDeployLocked/index.js index 6f2675868735..993b3287c4a2 100644 --- a/.github/actions/javascript/isStagingDeployLocked/index.js +++ b/.github/actions/javascript/isStagingDeployLocked/index.js @@ -184,8 +184,7 @@ class GithubUtils { isAccessible: match[4] === 'x', }), ); - const internalQAPRList = this.getStagingDeployCashInternalQA(issue); - return _.sortBy(_.union(PRList, internalQAPRList), 'number'); + return _.sortBy(PRList, 'number'); } /** @@ -295,11 +294,10 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); - const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(internalQAPRsNumbers) + .difference(_.keys(internalQAPRMap)) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/index.js b/.github/actions/javascript/markPullRequestsAsDeployed/index.js index c9d757b001fa..45235d928bd1 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/index.js +++ b/.github/actions/javascript/markPullRequestsAsDeployed/index.js @@ -353,8 +353,7 @@ class GithubUtils { isAccessible: match[4] === 'x', }), ); - const internalQAPRList = this.getStagingDeployCashInternalQA(issue); - return _.sortBy(_.union(PRList, internalQAPRList), 'number'); + return _.sortBy(PRList, 'number'); } /** @@ -464,11 +463,10 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); - const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(internalQAPRsNumbers) + .difference(_.keys(internalQAPRMap)) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); diff --git a/.github/actions/javascript/reopenIssueWithComment/index.js b/.github/actions/javascript/reopenIssueWithComment/index.js index 5d10b9d59fc6..4572d9a8c7da 100644 --- a/.github/actions/javascript/reopenIssueWithComment/index.js +++ b/.github/actions/javascript/reopenIssueWithComment/index.js @@ -195,8 +195,7 @@ class GithubUtils { isAccessible: match[4] === 'x', }), ); - const internalQAPRList = this.getStagingDeployCashInternalQA(issue); - return _.sortBy(_.union(PRList, internalQAPRList), 'number'); + return _.sortBy(PRList, 'number'); } /** @@ -306,11 +305,10 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); - const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(internalQAPRsNumbers) + .difference(_.keys(internalQAPRMap)) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); diff --git a/.github/actions/javascript/triggerWorkflowAndWait/index.js b/.github/actions/javascript/triggerWorkflowAndWait/index.js index 513c3e90fc2a..6dfc1726dffe 100644 --- a/.github/actions/javascript/triggerWorkflowAndWait/index.js +++ b/.github/actions/javascript/triggerWorkflowAndWait/index.js @@ -364,8 +364,7 @@ class GithubUtils { isAccessible: match[4] === 'x', }), ); - const internalQAPRList = this.getStagingDeployCashInternalQA(issue); - return _.sortBy(_.union(PRList, internalQAPRList), 'number'); + return _.sortBy(PRList, 'number'); } /** @@ -475,11 +474,10 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); - const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(internalQAPRsNumbers) + .difference(_.keys(internalQAPRMap)) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); diff --git a/.github/actions/javascript/verifySignedCommits/index.js b/.github/actions/javascript/verifySignedCommits/index.js index 9a45d951a369..a4243f8c2960 100644 --- a/.github/actions/javascript/verifySignedCommits/index.js +++ b/.github/actions/javascript/verifySignedCommits/index.js @@ -184,8 +184,7 @@ class GithubUtils { isAccessible: match[4] === 'x', }), ); - const internalQAPRList = this.getStagingDeployCashInternalQA(issue); - return _.sortBy(_.union(PRList, internalQAPRList), 'number'); + return _.sortBy(PRList, 'number'); } /** @@ -295,11 +294,10 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); - const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(internalQAPRsNumbers) + .difference(_.keys(internalQAPRMap)) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value(); diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index 9d5d2b1fd646..09f84a36a232 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -144,8 +144,7 @@ class GithubUtils { isAccessible: match[4] === 'x', }), ); - const internalQAPRList = this.getStagingDeployCashInternalQA(issue); - return _.sortBy(_.union(PRList, internalQAPRList), 'number'); + return _.sortBy(PRList, 'number'); } /** @@ -255,11 +254,10 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); const accessibleOrNoQAPRs = _.union(accessiblePRList, noQAPRs); - const internalQAPRsNumbers = _.map(_.keys(internalQAPRMap), this.getPullRequestNumberFromURL); const sortedPRList = _.chain(PRList) .difference(automatedPRs) - .difference(internalQAPRsNumbers) + .difference(_.keys(internalQAPRMap)) .unique() .sortBy(GithubUtils.getPullRequestNumberFromURL) .value();