mirror of
https://github.com/pre-commit/action.git
synced 2026-05-14 01:43:48 +00:00
Prevent checking out an already existing branch.
This commit is contained in:
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);
|
||||
|
||||
Reference in New Issue
Block a user