feat: add safe GitHub CLI wrapper

This commit is contained in:
Codex
2026-05-20 08:32:29 +00:00
parent a6e21ec201
commit ca74677703
6 changed files with 641 additions and 2 deletions
+9
View File
@@ -18,6 +18,7 @@ import { ciHelp, runCiCommand } from "./src/ci";
import { runSwapCommand } from "./src/swap";
import { runDevEnvCommand } from "./src/dev-env";
import { runArtifactRegistryCommand } from "./src/artifact-registry";
import { runGhCommand } from "./src/gh";
import { isHelpToken, rootHelp, serverHelp, sshHelp, staticNamespaceHelp } from "./src/help";
const remoteOptions = extractRemoteCliOptions(process.argv.slice(2));
@@ -143,6 +144,14 @@ async function main(): Promise<void> {
return;
}
if (top === "gh") {
const result = await runGhCommand(args.slice(1));
const ok = (result as { ok?: unknown }).ok !== false;
emitJson(commandName, result, ok);
if (!ok) process.exitCode = 1;
return;
}
const config = readConfig();
if (top === "ssh") {