(pr: GitHubPullRequest)
| 689 | } |
| 690 | |
| 691 | async function checkoutLocalBranch(pr: GitHubPullRequest) { |
| 692 | console.log("Checking out local branch...") |
| 693 | |
| 694 | const branch = pr.headRefName |
| 695 | const depth = Math.max(pr.commits.totalCount, 20) |
| 696 | |
| 697 | await $`git fetch origin --depth=${depth} ${branch}` |
| 698 | await $`git checkout ${branch}` |
| 699 | } |
| 700 | |
| 701 | async function checkoutForkBranch(pr: GitHubPullRequest) { |
| 702 | console.log("Checking out fork branch...") |