| name | GitHub CLI |
| description | gh CLI patterns, JSON field discovery, PR check interpretation, label management, merge settings verification. |
GitHub CLI
JSON Field Discovery
Wrong -- guess field names:
gh pr checks 42 --json conclusion
Right -- discover fields first:
gh pr checks 42 --json 2>&1 | head -5
PR Check Interpretation
Wrong -- exit code 0 means passed, raw output is readable:
gh pr checks 42
Right -- use structured JSON, filter review, or --watch:
gh pr checks 42 --json name,state,conclusion | jq '.[] | select(.name != "review")'
gh pr checks 42 --watch
Release vs PR Flags
Wrong -- --body is for pr/issue create, not release:
gh release create v1.0.0 --body "notes"
Right -- releases use --notes:
gh release create v1.0.0 --notes "notes"
Label and Merge Settings
Wrong -- assume labels exist and merge method is allowed:
gh issue create --label "chore" --title "Fix"
gh pr merge 42 --merge
Right -- check or create first:
gh label list && gh label create "chore" --color "ededed"
gh api repos/{owner}/{repo} --jq '.allow_squash_merge, .allow_merge_commit'
Duplicate PR Prevention
Wrong -- create PR when one already exists for this branch:
gh pr create --title "feat: thing"
Right -- check first, edit if exists:
gh pr list --head <branch> --base <base>
Identifier Discovery
Wrong -- fabricate repo names or issue numbers (case-sensitive):
gh issue view 42 --repo owner/MyProject
Right -- discover identifiers:
gh repo list owner --json name --limit 50
gh issue list --search "bug in login"