From 75fa31dc7e7ba1b1b3214e734ee1c449bc88712b Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Tue, 20 Apr 2021 19:01:11 -0400 Subject: [PATCH] Prevent checking out an already existing branch. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 4fc00db..9288218 100644 --- a/index.js +++ b/index.js @@ -87,7 +87,7 @@ async function main() { ); const branch = pr.head.ref; - await exec.exec('git', ['checkout', 'HEAD', '-b', branch]); + await exec.exec('git', ['checkout', 'HEAD', '-B', branch]); await exec.exec('git', ['commit', '-am', 'pre-commit fixes']); const url = addToken(pr.head.repo.clone_url, token);