[CI] test committed
This commit is contained in:
parent
5ea31358e9
commit
5b1bff2be0
3 changed files with 18 additions and 8 deletions
|
@ -27,6 +27,11 @@ inputs:
|
|||
branch:
|
||||
description: 'The pull request branch name.'
|
||||
default: 'create-pull-request/patch'
|
||||
delete-branch:
|
||||
description: >
|
||||
Delete the `branch` when closing pull requests, and when undeleted after merging.
|
||||
Recommend `true`.
|
||||
default: false
|
||||
branch-suffix:
|
||||
description: 'The branch suffix type when using the alternative branching strategy.'
|
||||
base:
|
||||
|
|
8
dist/index.js
vendored
8
dist/index.js
vendored
|
@ -1405,6 +1405,7 @@ function run() {
|
|||
author: core.getInput('author'),
|
||||
signoff: core.getInput('signoff') === 'true',
|
||||
branch: core.getInput('branch'),
|
||||
deleteBranch: core.getInput('delete-branch') === 'true',
|
||||
branchSuffix: core.getInput('branch-suffix'),
|
||||
base: core.getInput('base'),
|
||||
pushToFork: core.getInput('push-to-fork'),
|
||||
|
@ -7035,10 +7036,12 @@ function createPullRequest(inputs) {
|
|||
yield githubHelper.createOrUpdatePullRequest(inputs, baseRemote.repository, branchRepository);
|
||||
}
|
||||
else {
|
||||
// If there is no longer a diff with the base delete the branch
|
||||
// There is no longer a diff with the base
|
||||
// Check we are in a state where a branch exists
|
||||
if (['updated', 'not-updated'].includes(result.action)) {
|
||||
core.info(`Branch '${inputs.branch}' no longer differs from base branch '${inputs.base}'`);
|
||||
core.info(`Closing pull request and deleting branch '${inputs.branch}'`);
|
||||
if (inputs.deleteBranch) {
|
||||
core.info(`Deleting branch '${inputs.branch}'`);
|
||||
yield git.push([
|
||||
'--delete',
|
||||
'--force',
|
||||
|
@ -7048,6 +7051,7 @@ function createPullRequest(inputs) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
|
|
1
report.txt
Normal file
1
report.txt
Normal file
|
@ -0,0 +1 @@
|
|||
1599356009
|
Loading…
Add table
Add a link
Reference in a new issue