fix: render gh defaults as concise tables
This commit is contained in:
@@ -7,7 +7,7 @@ import { DEFAULT_REPO } from "./types";
|
||||
export function ghHelp(): unknown {
|
||||
return {
|
||||
command: "gh",
|
||||
output: "json",
|
||||
output: "text",
|
||||
usage: [
|
||||
"bun scripts/cli.ts gh auth status [--repo owner/name]",
|
||||
"bun scripts/cli.ts gh repo view <owner/repo>|--repo owner/name",
|
||||
@@ -66,6 +66,7 @@ export function ghHelp(): unknown {
|
||||
"Issue and PR create/read/update/comment/close/reopen use GitHub REST and do not require the gh binary when GH_TOKEN or GITHUB_TOKEN is present.",
|
||||
"repo view/create use GitHub REST through the same token path. repo create defaults to private repositories, preflights existing repos, supports --dry-run, and refuses duplicate creation.",
|
||||
"Token values are never printed; auth status reports only token source and presence.",
|
||||
"Default gh output is k8s-style text/table/summary with Next drill-down commands. Machine-readable or full-disclosure output must be requested explicitly with --json, --full, or --raw where supported.",
|
||||
"issue list and pr list accept a single positional owner/repo as a compatibility alias for --repo owner/name. The positional repo and --repo must match if both are supplied; non-repo positionals fail structurally instead of falling back to the default repo.",
|
||||
"issue list defaults to --state open and bounded --limit 30; it paginates GitHub REST/Search pages internally when --limit exceeds GitHub's per-page cap and discloses pagination/rawCount/hasMore so operators do not mistake a single page for the full repository. --search uses GitHub Search Issues API with repo/type/state qualifiers for low-friction dedupe lookup before creating a new issue. --title-prefix filters the bounded listed issues locally by exact title startsWith, useful for [FEEDBACK] dedupe, and reports titleFilter input/output counts. Supported --json fields are number,title,state,closed,closedAt,url,updatedAt,createdAt,author,labels and unknown fields fail structurally.",
|
||||
"PR list defaults to --state all for compatibility with earlier UniDesk CLI behavior; supported states are open, closed, and all.",
|
||||
@@ -178,7 +179,7 @@ export function ghScopedHelp(args: string[]): unknown | null {
|
||||
if (usage.length === 0) continue;
|
||||
return {
|
||||
command: `gh ${scopedTokens.join(" ")}`,
|
||||
output: "json",
|
||||
output: "text",
|
||||
scoped: true,
|
||||
requestedCommand: requestedTokens.join(" "),
|
||||
matchedCommand: scopedTokens.join(" "),
|
||||
@@ -189,7 +190,7 @@ export function ghScopedHelp(args: string[]): unknown | null {
|
||||
}
|
||||
return {
|
||||
command: `gh ${requestedTokens.join(" ")}`,
|
||||
output: "json",
|
||||
output: "text",
|
||||
scoped: true,
|
||||
requestedCommand: requestedTokens.join(" "),
|
||||
usage: [],
|
||||
|
||||
Reference in New Issue
Block a user