Skip to content

Commit

Permalink
Merge pull request #4336 from Expensify/joe-fix-cp-bug
Browse files Browse the repository at this point in the history
Update getPullRequestsMergedBetween to run pre-set string command
  • Loading branch information
AndrewGable authored Aug 6, 2021
2 parents 439b830 + f6c4615 commit 27e9f06
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/actions/createOrUpdateStagingDeploy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
4 changes: 3 additions & 1 deletion .github/actions/getDeployPullRequestList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
4 changes: 3 additions & 1 deletion .github/libs/GitUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit 27e9f06

Please sign in to comment.