(kind: GhRetryKind, attempt: number)
| 56 | } |
| 57 | |
| 58 | export function ghRetryWaitMs(kind: GhRetryKind, attempt: number): number { |
| 59 | if (kind === "throttle") return Math.min(600_000, 30_000 * 2 ** attempt); |
| 60 | if (kind === "transient") return Math.min(60_000, 2_000 * 2 ** attempt); |
| 61 | return 0; |
| 62 | } |
| 63 | |
| 64 | export function summarizeGhArgs(args: readonly string[]): string { |
| 65 | if (args[0] === "api" && args[1]) return `gh api ${args[1]}`; |
no outgoing calls
no test coverage detected