From 9b632d8eba4ad9acf9621d059f7b0ece6b4125a3 Mon Sep 17 00:00:00 2001 From: peter-evans Date: Wed, 23 Dec 2020 04:46:13 +0000 Subject: [PATCH] [CI] test built --- dist/index.js | 7 ++++--- report.txt | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 report.txt diff --git a/dist/index.js b/dist/index.js index cbc25fb..938944a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -134,8 +134,9 @@ function createOrUpdateBranch(git, commitMessage, base, branch, branchRemoteName // Perform fetch and reset the working base // Commits made during the workflow will be removed if (workingBaseType == WorkingBaseType.Branch) { - core.info(`Resetting working base branch '${workingBase}' to its remote`); - yield git.fetch([`${workingBase}:${workingBase}`], baseRemote, ['--force']); + core.info(`Resetting working base branch '${workingBase}'`); + yield git.checkout(workingBase); + yield git.exec(['reset', '--hard', `${baseRemote}/${workingBase}`]); } // If the working base is not the base, rebase the temp branch commits // This will also be true if the working base type is a commit @@ -162,7 +163,7 @@ function createOrUpdateBranch(git, commitMessage, base, branch, branchRemoteName // The pull request branch does not exist core.info(`Pull request branch '${branch}' does not exist yet.`); // Create the pull request branch - yield git.checkout(branch, 'HEAD'); + yield git.checkout(branch, tempBranch); // Check if the pull request branch is ahead of the base result.hasDiffWithBase = yield isAhead(git, base, branch); if (result.hasDiffWithBase) { diff --git a/report.txt b/report.txt new file mode 100644 index 0000000..227d14e --- /dev/null +++ b/report.txt @@ -0,0 +1 @@ +1608698772