MCPcopy Create free account
hub / github.com/backnotprop/plannotator / getGhUser

Function getGhUser

packages/shared/pr-github.ts:49–59  ·  view source on GitHub ↗
(runtime: PRRuntime, host: string)

Source from the content-addressed store, hash-verified

47}
48
49export 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

Callers 1

getUserFunction · 0.90

Calls 1

hostnameArgsFunction · 0.85

Tested by

no test coverage detected