From ac5389b9c6297ac1f115bb434cc7f11e1976eb96 Mon Sep 17 00:00:00 2001 From: peter-evans Date: Thu, 4 Nov 2021 01:45:08 +0000 Subject: [PATCH] [CI] test committed --- dist/index.js | 6 +++++- report.txt | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 report.txt diff --git a/dist/index.js b/dist/index.js index 181e9b7..c2016f6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -115,7 +115,8 @@ function createOrUpdateBranch(git, commitMessage, base, branch, branchRemoteName const result = { action: 'none', base: base, - hasDiffWithBase: false + hasDiffWithBase: false, + headSha: '' }; // Save the working base changes to a temporary branch const tempBranch = (0, uuid_1.v4)(); @@ -216,6 +217,8 @@ function createOrUpdateBranch(git, commitMessage, base, branch, branchRemoteName // Check if the pull request branch is ahead of the base result.hasDiffWithBase = yield isAhead(git, base, branch); } + // Get the pull request branch SHA + result.headSha = yield git.revParse('HEAD'); // Delete the temporary branch yield git.exec(['branch', '--delete', '--force', tempBranch]); return result; @@ -403,6 +406,7 @@ function createPullRequest(inputs) { else if (result.action == 'updated') { core.setOutput('pull-request-operation', 'updated'); } + core.setOutput('pull-request-head-sha', result.headSha); // Deprecated core.exportVariable('PULL_REQUEST_NUMBER', pull.number); core.endGroup(); diff --git a/report.txt b/report.txt new file mode 100644 index 0000000..c09804c --- /dev/null +++ b/report.txt @@ -0,0 +1 @@ +1635990308