From 0b0c49cd0b45aa57df96b5b3aa1327baa68a61be Mon Sep 17 00:00:00 2001 From: Joe Gambino Date: Fri, 30 Jul 2021 13:09:34 -0700 Subject: [PATCH 1/3] Update execSync command to run pre-defined string --- .github/libs/GitUtils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index 77bb2c73da28..3a644f1aa674 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -9,8 +9,9 @@ const {execSync} = require('child_process'); * @returns {Array} */ function getPullRequestsMergedBetween(fromRef, toRef) { + const command = `git log --format="%s" ${fromRef}...${toRef}`; console.log('Getting pull requests merged between the following refs:', fromRef, toRef); - const localGitLogs = execSync(`git log --format="%s" ${fromRef}...${toRef}`).toString(); + const localGitLogs = execSync(command).toString(); return _.map( [...localGitLogs.matchAll(/Merge pull request #(\d{1,6}) from (?!Expensify\/(?:master|main|version-))/g)], match => match[1], From 517b2fdedc400daa2ccd37bfa4e60d01f3eac629 Mon Sep 17 00:00:00 2001 From: Joe Gambino Date: Fri, 30 Jul 2021 13:18:33 -0700 Subject: [PATCH 2/3] rebuild actions --- .github/actions/createOrUpdateStagingDeploy/index.js | 3 ++- .github/actions/getDeployPullRequestList/index.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/createOrUpdateStagingDeploy/index.js b/.github/actions/createOrUpdateStagingDeploy/index.js index 93174ace2360..15d5a427ab62 100644 --- a/.github/actions/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/createOrUpdateStagingDeploy/index.js @@ -193,8 +193,9 @@ const {execSync} = __nccwpck_require__(3129); * @returns {Array} */ function getPullRequestsMergedBetween(fromRef, toRef) { + const command = `git log --format="%s" ${fromRef}...${toRef}`; console.log('Getting pull requests merged between the following refs:', fromRef, toRef); - const localGitLogs = execSync(`git log --format="%s" ${fromRef}...${toRef}`).toString(); + const localGitLogs = execSync(command).toString(); return _.map( [...localGitLogs.matchAll(/Merge pull request #(\d{1,6}) from (?!Expensify\/(?:master|main|version-))/g)], match => match[1], diff --git a/.github/actions/getDeployPullRequestList/index.js b/.github/actions/getDeployPullRequestList/index.js index 6fcb94be23e7..63417cb8c3dc 100644 --- a/.github/actions/getDeployPullRequestList/index.js +++ b/.github/actions/getDeployPullRequestList/index.js @@ -117,8 +117,9 @@ const {execSync} = __nccwpck_require__(3129); * @returns {Array} */ function getPullRequestsMergedBetween(fromRef, toRef) { + const command = `git log --format="%s" ${fromRef}...${toRef}`; console.log('Getting pull requests merged between the following refs:', fromRef, toRef); - const localGitLogs = execSync(`git log --format="%s" ${fromRef}...${toRef}`).toString(); + const localGitLogs = execSync(command).toString(); return _.map( [...localGitLogs.matchAll(/Merge pull request #(\d{1,6}) from (?!Expensify\/(?:master|main|version-))/g)], match => match[1], From f6c46150163948284cab0e5e486d7bc6175742fa Mon Sep 17 00:00:00 2001 From: Joe Gambino Date: Fri, 30 Jul 2021 13:31:10 -0700 Subject: [PATCH 3/3] add log line to output command --- .github/actions/createOrUpdateStagingDeploy/index.js | 1 + .github/actions/getDeployPullRequestList/index.js | 1 + .github/libs/GitUtils.js | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/actions/createOrUpdateStagingDeploy/index.js b/.github/actions/createOrUpdateStagingDeploy/index.js index 15d5a427ab62..0ad3c41119a3 100644 --- a/.github/actions/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/createOrUpdateStagingDeploy/index.js @@ -195,6 +195,7 @@ const {execSync} = __nccwpck_require__(3129); function getPullRequestsMergedBetween(fromRef, toRef) { const command = `git log --format="%s" ${fromRef}...${toRef}`; console.log('Getting pull requests merged between the following refs:', fromRef, toRef); + console.log('Running command: ', command); const localGitLogs = execSync(command).toString(); return _.map( [...localGitLogs.matchAll(/Merge pull request #(\d{1,6}) from (?!Expensify\/(?:master|main|version-))/g)], diff --git a/.github/actions/getDeployPullRequestList/index.js b/.github/actions/getDeployPullRequestList/index.js index 63417cb8c3dc..3b4be6fd47c8 100644 --- a/.github/actions/getDeployPullRequestList/index.js +++ b/.github/actions/getDeployPullRequestList/index.js @@ -119,6 +119,7 @@ const {execSync} = __nccwpck_require__(3129); function getPullRequestsMergedBetween(fromRef, toRef) { const command = `git log --format="%s" ${fromRef}...${toRef}`; console.log('Getting pull requests merged between the following refs:', fromRef, toRef); + console.log('Running command: ', command); const localGitLogs = execSync(command).toString(); return _.map( [...localGitLogs.matchAll(/Merge pull request #(\d{1,6}) from (?!Expensify\/(?:master|main|version-))/g)], diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index 3a644f1aa674..5f86983ac6c3 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -11,6 +11,7 @@ const {execSync} = require('child_process'); function getPullRequestsMergedBetween(fromRef, toRef) { const command = `git log --format="%s" ${fromRef}...${toRef}`; console.log('Getting pull requests merged between the following refs:', fromRef, toRef); + console.log('Running command: ', command); const localGitLogs = execSync(command).toString(); return _.map( [...localGitLogs.matchAll(/Merge pull request #(\d{1,6}) from (?!Expensify\/(?:master|main|version-))/g)],