(repo: string, commitSha: string)
| 370 | } |
| 371 | |
| 372 | async function cloneRepositoryAtCommit(repo: string, commitSha: string) { |
| 373 | await $`git init`.quiet(); |
| 374 | await $`git remote add origin https://github.com/${repo}.git`.quiet(); |
| 375 | await $`git fetch --depth 1 origin ${commitSha}`.quiet(); |
| 376 | await $`git checkout --detach FETCH_HEAD`.quiet(); |
| 377 | await $`git reset --hard FETCH_HEAD`.quiet(); |
| 378 | } |
| 379 | |
| 380 | async function cleanupRepository( |
| 381 | cwd: string, |