From 45d735a1881f256287c6275ae8df81c5a607fc2f Mon Sep 17 00:00:00 2001 From: peter-evans Date: Tue, 24 Nov 2020 02:54:59 +0000 Subject: [PATCH] [CI] test built --- dist/index.js | 6 ++++++ report.txt | 1 + 2 files changed, 7 insertions(+) create mode 100644 report.txt diff --git a/dist/index.js b/dist/index.js index e1a6acd0ac..ec4eea1a4a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -291,6 +291,12 @@ function createPullRequest(inputs) { const remoteUrl = utils.getRemoteUrl(baseRemote.protocol, branchRepository); yield git.exec(['remote', 'add', 'fork', remoteUrl]); } + // For self-hosted runners the repository state persists between runs. + // This command prunes the stale remote ref when the pull request branch was + // 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]); core.endGroup(); core.info(`Pull request branch target repository set to ${branchRepository}`); // Configure auth diff --git a/report.txt b/report.txt new file mode 100644 index 0000000000..54c96ce334 --- /dev/null +++ b/report.txt @@ -0,0 +1 @@ +1606186499