Skip to content

Commit 27e9f06

Browse files
authored
Merge pull request #4336 from Expensify/joe-fix-cp-bug
Update getPullRequestsMergedBetween to run pre-set string command
2 parents 439b830 + f6c4615 commit 27e9f06

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.github/actions/createOrUpdateStagingDeploy/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,10 @@ const {execSync} = __nccwpck_require__(3129);
193193
* @returns {Array}
194194
*/
195195
function getPullRequestsMergedBetween(fromRef, toRef) {
196+
const command = `git log --format="%s" ${fromRef}...${toRef}`;
196197
console.log('Getting pull requests merged between the following refs:', fromRef, toRef);
197-
const localGitLogs = execSync(`git log --format="%s" ${fromRef}...${toRef}`).toString();
198+
console.log('Running command: ', command);
199+
const localGitLogs = execSync(command).toString();
198200
return _.map(
199201
[...localGitLogs.matchAll(/Merge pull request #(\d{1,6}) from (?!Expensify\/(?:master|main|version-))/g)],
200202
match => match[1],

.github/actions/getDeployPullRequestList/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,10 @@ const {execSync} = __nccwpck_require__(3129);
117117
* @returns {Array}
118118
*/
119119
function getPullRequestsMergedBetween(fromRef, toRef) {
120+
const command = `git log --format="%s" ${fromRef}...${toRef}`;
120121
console.log('Getting pull requests merged between the following refs:', fromRef, toRef);
121-
const localGitLogs = execSync(`git log --format="%s" ${fromRef}...${toRef}`).toString();
122+
console.log('Running command: ', command);
123+
const localGitLogs = execSync(command).toString();
122124
return _.map(
123125
[...localGitLogs.matchAll(/Merge pull request #(\d{1,6}) from (?!Expensify\/(?:master|main|version-))/g)],
124126
match => match[1],

.github/libs/GitUtils.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ const {execSync} = require('child_process');
99
* @returns {Array}
1010
*/
1111
function getPullRequestsMergedBetween(fromRef, toRef) {
12+
const command = `git log --format="%s" ${fromRef}...${toRef}`;
1213
console.log('Getting pull requests merged between the following refs:', fromRef, toRef);
13-
const localGitLogs = execSync(`git log --format="%s" ${fromRef}...${toRef}`).toString();
14+
console.log('Running command: ', command);
15+
const localGitLogs = execSync(command).toString();
1416
return _.map(
1517
[...localGitLogs.matchAll(/Merge pull request #(\d{1,6}) from (?!Expensify\/(?:master|main|version-))/g)],
1618
match => match[1],

0 commit comments

Comments
 (0)