From 6c8ab931a6dc8395476b9f42aaf9d66ec5a7e858 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Tue, 19 Jul 2022 13:40:29 +0100 Subject: [PATCH] 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();