From 149be75e5bcfdfce9eb330c4494e1ed142fc237c Mon Sep 17 00:00:00 2001 From: peter-evans Date: Thu, 30 Nov 2023 14:26:10 +0000 Subject: [PATCH] [CI] test built --- dist/index.js | 9 ++++----- report.txt | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 report.txt diff --git a/dist/index.js b/dist/index.js index 66d4115..62e4df8 100644 --- a/dist/index.js +++ b/dist/index.js @@ -171,9 +171,7 @@ function createOrUpdateBranch(git, commitMessage, base, branch, branchRemoteName if (branchRemoteName == 'fork') { // If pushing to a fork we must fetch with 'unshallow' to avoid the following error on git push // ! [remote rejected] HEAD -> tests/push-branch-to-fork (shallow update not allowed) - yield git.fetch([`${workingBase}:${workingBase}`], baseRemote, [ - '--force' - ]); + yield git.fetch([`${workingBase}:${workingBase}`], baseRemote, ['--force'], true); } else { // If the remote is 'origin' we can git reset @@ -793,14 +791,15 @@ class GitCommandManager { return output.exitCode === 0; }); } - fetch(refSpec, remoteName, options) { + fetch(refSpec, remoteName, options, unshallow = false) { return __awaiter(this, void 0, void 0, function* () { const args = ['-c', 'protocol.version=2', 'fetch']; if (!refSpec.some(x => x === tagsRefSpec)) { args.push('--no-tags'); } args.push('--progress', '--no-recurse-submodules'); - if (utils.fileExistsSync(path.join(this.workingDirectory, '.git', 'shallow'))) { + if (unshallow && + utils.fileExistsSync(path.join(this.workingDirectory, '.git', 'shallow'))) { args.push('--unshallow'); } if (options) { diff --git a/report.txt b/report.txt new file mode 100644 index 0000000..69ace6f --- /dev/null +++ b/report.txt @@ -0,0 +1 @@ +1701354370