Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,12 @@ function createPullRequest(inputs) {
// deleted after being merged or closed. Without this the push using
// '--force-with-lease' fails due to "stale info."
// https://github.com/peter-evans/create-pull-request/issues/633
yield git.exec(['remote', 'prune', branchRemoteName]);
try {
yield git.exec(['remote', 'prune', branchRemoteName]);
}
catch (error) {
core.warning(`Failed to prune remote '${branchRemoteName}': ${error.message}`);
}
}
core.endGroup();
// Apply the branch suffix if set
Expand Down
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion src/create-pull-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,13 @@ export async function createPullRequest(inputs: Inputs): Promise<void> {
// deleted after being merged or closed. Without this the push using
// '--force-with-lease' fails due to "stale info."
// https://github.com/peter-evans/create-pull-request/issues/633
await git.exec(['remote', 'prune', branchRemoteName])
try {
await git.exec(['remote', 'prune', branchRemoteName])
} catch (error) {
core.warning(
`Failed to prune remote '${branchRemoteName}': ${(error as Error).message}`
)
}
}
core.endGroup()

Expand Down