From ab91969816fcc0271467c9e0eccc1a5aa35a8170 Mon Sep 17 00:00:00 2001 From: Andrew Gable Date: Thu, 5 Aug 2021 20:01:34 -0600 Subject: [PATCH] Merge pull request #4336 from Expensify/joe-fix-cp-bug Update getPullRequestsMergedBetween to run pre-set string command (cherry picked from commit 27e9f0691f965c393a356627002fc6e4aca0d31d) --- .github/actions/createOrUpdateStagingDeploy/index.js | 4 +++- .github/actions/getDeployPullRequestList/index.js | 4 +++- .github/libs/GitUtils.js | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/actions/createOrUpdateStagingDeploy/index.js b/.github/actions/createOrUpdateStagingDeploy/index.js index 93174ace2360..0ad3c41119a3 100644 --- a/.github/actions/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/createOrUpdateStagingDeploy/index.js @@ -193,8 +193,10 @@ 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(); + 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)], match => match[1], diff --git a/.github/actions/getDeployPullRequestList/index.js b/.github/actions/getDeployPullRequestList/index.js index 6fcb94be23e7..3b4be6fd47c8 100644 --- a/.github/actions/getDeployPullRequestList/index.js +++ b/.github/actions/getDeployPullRequestList/index.js @@ -117,8 +117,10 @@ 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(); + 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)], match => match[1], diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index 77bb2c73da28..5f86983ac6c3 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -9,8 +9,10 @@ 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(); + 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)], match => match[1],