[CI] test committed

This commit is contained in:
peter-evans 2021-05-09 01:11:59 +00:00 committed by GitHub
parent 548adff9dc
commit deeb4c89d3
3 changed files with 10 additions and 2 deletions

View file

@ -24,6 +24,9 @@ inputs:
signoff:
description: 'Add `Signed-off-by` line by the committer at the end of the commit log message.'
default: false
gpg-sign:
description: 'GPG-sign commits.'
default: false
branch:
description: 'The pull request branch name.'
default: 'create-pull-request/patch'

8
dist/index.js vendored
View file

@ -99,7 +99,7 @@ function splitLines(multilineString) {
.map(s => s.trim())
.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* () {
// Get the working 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) {
params.push('--signoff');
}
if (gpgSign) {
params.push('--gpg-sign');
}
yield git.commit(params);
}
// Perform fetch and reset the working base
@ -375,7 +378,7 @@ function createPullRequest(inputs) {
core.endGroup();
// 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();
if (['created', 'updated'].includes(result.action)) {
// The branch was created or updated
@ -1070,6 +1073,7 @@ function run() {
committer: core.getInput('committer'),
author: core.getInput('author'),
signoff: core.getInput('signoff') === 'true',
gpgSign: core.getInput('gpg-sign') === 'true',
branch: core.getInput('branch'),
deleteBranch: core.getInput('delete-branch') === 'true',
branchSuffix: core.getInput('branch-suffix'),

1
report.txt Normal file
View file

@ -0,0 +1 @@
1620522719