(runtime: PRRuntime, host: string)
| 47 | } |
| 48 | |
| 49 | export async function getGhUser(runtime: PRRuntime, host: string): Promise<string | null> { |
| 50 | try { |
| 51 | const result = await runtime.runCommand("gh", hostnameArgs(host, ["api", "user", "--jq", ".login"])); |
| 52 | if (result.exitCode === 0 && result.stdout.trim()) { |
| 53 | return result.stdout.trim(); |
| 54 | } |
| 55 | return null; |
| 56 | } catch { |
| 57 | return null; |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | // --- Fetch PR --- |
| 62 |
no test coverage detected