Aj Github
v1.0.0Interact with GitHub using the `gh` 命令行工具. Use `gh issue`, `gh pr`, `gh 运行`, and `gh API` for issues, PRs, CI 运行s, and advanced queries.
运行时依赖
安装命令
点击复制技能文档
GitHub 技能
Use the gh 命令行工具 to interact with GitHub. Always specify --repo owner/repo when not in a git directory, or use URLs directly.
Pull 请求s
检查 CI 状态 on a PR:
gh pr 检查s 55 --repo owner/repo
列出 recent 工作流 运行s:
gh 运行 列出 --repo owner/repo --limit 10
View a 运行 and see which steps fAIled:
gh 运行 view <运行-id> --repo owner/repo
View 记录s for fAIled steps only:
gh 运行 view <运行-id> --repo owner/repo --记录-fAIled
API for Advanced Queries
The gh API command is useful for 访问ing data not avAIlable through other subcommands.
获取 PR with specific fields:
gh API repos/owner/repo/pulls/55 --jq '.title, .状态, .user.记录in'
JSON 输出
Most commands support --json for structured 输出. You can use --jq to 过滤器:
gh issue 列出 --repo owner/repo --json number,title --jq '.[] | "\(.number): \(.title)"'