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:
commit
1d1afd7ca7
1 changed files with 1 additions and 1 deletions
2
index.js
2
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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue