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
548adff9dc
commit
0ed41f3b29
3 changed files with 10 additions and 2 deletions
|
@ -24,6 +24,9 @@ inputs:
|
||||||
signoff:
|
signoff:
|
||||||
description: 'Add `Signed-off-by` line by the committer at the end of the commit log message.'
|
description: 'Add `Signed-off-by` line by the committer at the end of the commit log message.'
|
||||||
default: false
|
default: false
|
||||||
|
gpg-sign:
|
||||||
|
description: 'GPG-sign commits.'
|
||||||
|
default: false
|
||||||
branch:
|
branch:
|
||||||
description: 'The pull request branch name.'
|
description: 'The pull request branch name.'
|
||||||
default: 'create-pull-request/patch'
|
default: 'create-pull-request/patch'
|
||||||
|
|
8
dist/index.js
vendored
8
dist/index.js
vendored
|
@ -99,7 +99,7 @@ function splitLines(multilineString) {
|
||||||
.map(s => s.trim())
|
.map(s => s.trim())
|
||||||
.filter(x => x !== '');
|
.filter(x => x !== '');
|
||||||
}
|
}
|
||||||
function createOrUpdateBranch(git, commitMessage, base, branch, branchRemoteName, signoff) {
|
function createOrUpdateBranch(git, commitMessage, base, branch, branchRemoteName, signoff, gpgSign) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
// Get the working base.
|
// Get the working base.
|
||||||
// When a ref, it may or may not be the actual base.
|
// When a ref, it may or may not be the actual base.
|
||||||
|
@ -129,6 +129,9 @@ function createOrUpdateBranch(git, commitMessage, base, branch, branchRemoteName
|
||||||
if (signoff) {
|
if (signoff) {
|
||||||
params.push('--signoff');
|
params.push('--signoff');
|
||||||
}
|
}
|
||||||
|
if (gpgSign) {
|
||||||
|
params.push('--gpg-sign');
|
||||||
|
}
|
||||||
yield git.commit(params);
|
yield git.commit(params);
|
||||||
}
|
}
|
||||||
// Perform fetch and reset the working base
|
// Perform fetch and reset the working base
|
||||||
|
@ -375,7 +378,7 @@ function createPullRequest(inputs) {
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
// Create or update the pull request branch
|
// Create or update the pull request branch
|
||||||
core.startGroup('Create or update the pull request branch');
|
core.startGroup('Create or update the pull request branch');
|
||||||
const result = yield create_or_update_branch_1.createOrUpdateBranch(git, inputs.commitMessage, inputs.base, inputs.branch, branchRemoteName, inputs.signoff);
|
const result = yield create_or_update_branch_1.createOrUpdateBranch(git, inputs.commitMessage, inputs.base, inputs.branch, branchRemoteName, inputs.signoff, inputs.gpgSign);
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
if (['created', 'updated'].includes(result.action)) {
|
if (['created', 'updated'].includes(result.action)) {
|
||||||
// The branch was created or updated
|
// The branch was created or updated
|
||||||
|
@ -1070,6 +1073,7 @@ function run() {
|
||||||
committer: core.getInput('committer'),
|
committer: core.getInput('committer'),
|
||||||
author: core.getInput('author'),
|
author: core.getInput('author'),
|
||||||
signoff: core.getInput('signoff') === 'true',
|
signoff: core.getInput('signoff') === 'true',
|
||||||
|
gpgSign: core.getInput('gpg-sign') === 'true',
|
||||||
branch: core.getInput('branch'),
|
branch: core.getInput('branch'),
|
||||||
deleteBranch: core.getInput('delete-branch') === 'true',
|
deleteBranch: core.getInput('delete-branch') === 'true',
|
||||||
branchSuffix: core.getInput('branch-suffix'),
|
branchSuffix: core.getInput('branch-suffix'),
|
||||||
|
|
1
report.txt
Normal file
1
report.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
1620522721
|
Loading…
Add table
Add a link
Reference in a new issue