From 0985456df17fe59509416f963a09d4e9974606ad Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Sun, 8 Dec 2024 21:38:32 -0500 Subject: [PATCH 1/3] fix: don't use process as variable name --- lib/Git.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/Git.js b/lib/Git.js index a4346bd..af83d3d 100644 --- a/lib/Git.js +++ b/lib/Git.js @@ -449,23 +449,23 @@ class Git { logger.debug(`${this.command} ${commandArgs.join(' ')}`); if (execOptions.spawn) { - const process = child_process.spawn(this.command, commandArgs, execOptions); + const gitProcess = child_process.spawn(this.command, commandArgs, execOptions); if (execOptions.passthrough) { - process.stdout.on('data', data => data.toString().trimEnd().split(/\n/).forEach(line => logger.info(line.trimEnd()))); - process.stderr.on('data', data => data.toString().trimEnd().split(/\n/).forEach(line => logger.error(line.trimEnd()))); + gitProcess.stdout.on('data', data => data.toString().trimEnd().split(/\n/).forEach(line => logger.info(line.trimEnd()))); + gitProcess.stderr.on('data', data => data.toString().trimEnd().split(/\n/).forEach(line => logger.error(line.trimEnd()))); } else { if (execOptions.onStdout) { - process.stdout.on('data', data => data.toString().trimEnd().split(/\n/).forEach(line => execOptions.onStdout(line.trimEnd()))); + gitProcess.stdout.on('data', data => data.toString().trimEnd().split(/\n/).forEach(line => execOptions.onStdout(line.trimEnd()))); } if (execOptions.onStderr) { - process.stderr.on('data', data => data.toString().trimEnd().split(/\n/).forEach(line => execOptions.onStderr(line.trimEnd()))); + gitProcess.stderr.on('data', data => data.toString().trimEnd().split(/\n/).forEach(line => execOptions.onStderr(line.trimEnd()))); } } if (execOptions.wait) { return new Promise((resolve, reject) => { - process.on('exit', code => { + gitProcess.on('exit', code => { if (code == 0) { resolve(); } else { @@ -476,20 +476,20 @@ class Git { } let capturePromise; - process.captureOutput = (input = null) => { + gitProcess.captureOutput = (input = null) => { if (!capturePromise) { capturePromise = new Promise((resolve, reject) => { let output = '', error = ''; - process.stdout.on('data', data => { + gitProcess.stdout.on('data', data => { output += data; }); - process.stderr.on('data', data => { + gitProcess.stderr.on('data', data => { error += data; }); - process.on('close', code => { + gitProcess.on('close', code => { if (code == 0) { resolve(output); } else { @@ -504,18 +504,18 @@ class Git { } if (input) { - process.stdin.write(input); - process.stdin.end(); + gitProcess.stdin.write(input); + gitProcess.stdin.end(); } return capturePromise; }; - process.captureOutputTrimmed = async (input = null) => { - return (await process.captureOutput(input)).trim(); + gitProcess.captureOutputTrimmed = async (input = null) => { + return (await gitProcess.captureOutput(input)).trim(); }; - return process; + return gitProcess; } else if (execOptions.shell) { return new Promise((resolve, reject) => { child_process.exec(`${this.command} ${commandArgs.join(' ')}`, execOptions, (error, stdout, stderr) => { From c5d6b0e17482671d5024c02b9a4ec70a50fa0a9a Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Sun, 8 Dec 2024 21:40:20 -0500 Subject: [PATCH 2/3] chore: empty commit From 2972a1621084e52b6457b52d8dad8aa252f9742f Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Sun, 8 Dec 2024 20:15:49 -0500 Subject: [PATCH 3/3] fix(ci): use bot token to create release PR so tests run --- .github/workflows/release-prepare.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-prepare.yml b/.github/workflows/release-prepare.yml index 0a34fe3..5ed10da 100644 --- a/.github/workflows/release-prepare.yml +++ b/.github/workflows/release-prepare.yml @@ -16,5 +16,5 @@ jobs: - uses: JarvusInnovations/infra-components@channels/github-actions/release-prepare/latest with: - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.BOT_GITHUB_TOKEN }} release-branch: main