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

Merge pull request #97 from jackton1/patch-1

Prevent creating an already existing branch.
This commit is contained in:
Anthony Sottile 2021-04-20 16:40:06 -07:00 committed by GitHub
commit 1d1afd7ca7
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);