From 6900b74865ae403d2982bffe3ff0f1cd5b18b21f Mon Sep 17 00:00:00 2001 From: Vlad Frangu Date: Thu, 31 Mar 2022 16:17:34 +0300 Subject: [PATCH] ci: correctly delete the head branch (#388) --- scripts/bump-version.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bump-version.mjs b/scripts/bump-version.mjs index bc5a1df3..92dab5fb 100644 --- a/scripts/bump-version.mjs +++ b/scripts/bump-version.mjs @@ -85,7 +85,7 @@ if (previousPullRequest) { await octokit.request('DELETE /repos/{owner}/{repo}/git/refs/{ref}', { owner: OWNER, repo: REPOSITORY, - ref: `heads/chore/release/${newVersion['discord-api-types']}`, + ref: `heads/${previousPullRequest.head.ref}`, }); console.log(`✅ Done. Pull request ${previousPullRequest.number} was closed and will be recreated.`);