mirror of
https://forgejo.stefka.eu/jiriks74/create-pull-request.git
synced 2025-01-18 16:01:06 +01:00
Use force-with-lease to push the pr branch
This commit is contained in:
parent
5429e57002
commit
a6a1a418bf
3 changed files with 100 additions and 20 deletions
6
dist/index.js
vendored
6
dist/index.js
vendored
|
@ -10604,7 +10604,11 @@ function createPullRequest(inputs) {
|
|||
if (['created', 'updated'].includes(result.action)) {
|
||||
// The branch was created or updated
|
||||
core.startGroup(`Pushing pull request branch to 'origin/${inputs.branch}'`);
|
||||
yield git.push(['--force', 'origin', `HEAD:refs/heads/${inputs.branch}`]);
|
||||
yield git.push([
|
||||
'--force-with-lease',
|
||||
'origin',
|
||||
`HEAD:refs/heads/${inputs.branch}`
|
||||
]);
|
||||
core.endGroup();
|
||||
// Set the base. It would have been '' if not specified as an input
|
||||
inputs.base = result.base;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue