(
workspacePath: string,
abortSignal?: AbortSignal,
timeout = 10
)
| 1498 | } |
| 1499 | |
| 1500 | private async resolveCheckedOutBranch( |
| 1501 | workspacePath: string, |
| 1502 | abortSignal?: AbortSignal, |
| 1503 | timeout = 10 |
| 1504 | ): Promise<string | null> { |
| 1505 | try { |
| 1506 | const branchResult = await execBuffered( |
| 1507 | this, |
| 1508 | `git -C ${this.quoteForRemote(workspacePath)} branch --show-current`, |
| 1509 | { |
| 1510 | cwd: "/tmp", |
| 1511 | timeout, |
| 1512 | abortSignal, |
| 1513 | } |
| 1514 | ); |
| 1515 | const branchName = branchResult.stdout.trim(); |
| 1516 | return branchResult.exitCode === 0 && branchName.length > 0 ? branchName : null; |
| 1517 | } catch { |
| 1518 | return null; |
| 1519 | } |
| 1520 | } |
| 1521 | |
| 1522 | /** |
| 1523 | * Resolve the bundle staging ref for the trunk branch. |
no test coverage detected