mirror of
https://forgejo.stefka.eu/jiriks74/create-pull-request.git
synced 2025-01-18 16:01:06 +01:00
[CI] test built
This commit is contained in:
parent
3c3d696d5b
commit
f40eb96398
2 changed files with 6 additions and 1 deletions
6
dist/index.js
vendored
6
dist/index.js
vendored
|
@ -115,7 +115,8 @@ function createOrUpdateBranch(git, commitMessage, base, branch, branchRemoteName
|
||||||
const result = {
|
const result = {
|
||||||
action: 'none',
|
action: 'none',
|
||||||
base: base,
|
base: base,
|
||||||
hasDiffWithBase: false
|
hasDiffWithBase: false,
|
||||||
|
headSha: ''
|
||||||
};
|
};
|
||||||
// Save the working base changes to a temporary branch
|
// Save the working base changes to a temporary branch
|
||||||
const tempBranch = (0, uuid_1.v4)();
|
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
|
// Check if the pull request branch is ahead of the base
|
||||||
result.hasDiffWithBase = yield isAhead(git, base, branch);
|
result.hasDiffWithBase = yield isAhead(git, base, branch);
|
||||||
}
|
}
|
||||||
|
// Get the pull request branch SHA
|
||||||
|
result.headSha = yield git.revParse('HEAD');
|
||||||
// Delete the temporary branch
|
// Delete the temporary branch
|
||||||
yield git.exec(['branch', '--delete', '--force', tempBranch]);
|
yield git.exec(['branch', '--delete', '--force', tempBranch]);
|
||||||
return result;
|
return result;
|
||||||
|
@ -403,6 +406,7 @@ function createPullRequest(inputs) {
|
||||||
else if (result.action == 'updated') {
|
else if (result.action == 'updated') {
|
||||||
core.setOutput('pull-request-operation', 'updated');
|
core.setOutput('pull-request-operation', 'updated');
|
||||||
}
|
}
|
||||||
|
core.setOutput('pull-request-head-sha', result.headSha);
|
||||||
// Deprecated
|
// Deprecated
|
||||||
core.exportVariable('PULL_REQUEST_NUMBER', pull.number);
|
core.exportVariable('PULL_REQUEST_NUMBER', pull.number);
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
|
|
1
report.txt
Normal file
1
report.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
1635990306
|
Loading…
Add table
Add a link
Reference in a new issue