5
0
Fork 0
mirror of https://github.com/pre-commit/action.git synced 2025-11-07 18:56:55 +00:00

Prevent checking out an already existing branch.

This commit is contained in:
Tonye Jack 2021-04-20 19:01:11 -04:00 committed by GitHub
parent f0ba44300a
commit 75fa31dc7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);