Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
使用 gh 命令行工具与 GitHub 交互。当不在 git 目录中时,始终指定 --repo owner/repo,或直接使用 URL。
检查 PR 上的 CI 状态:
bash
gh pr checks 55 --repo owner/repo
列出最近的工作流运行:
bash
gh run list --repo owner/repo --limit 10
查看运行并找出哪些步骤失败:
bash
gh run view
仅查看失败步骤的日志:
bash
gh run view
gh api 命令可用于访问其他子命令无法获取的数据。
获取包含特定字段的 PR:
bash
gh api repos/owner/repo/pulls/55 --jq .title, .state, .user.login
大多数命令支持 --json 参数以输出结构化数据。可以使用 --jq 进行过滤:
bash
gh issue list --repo owner/repo --json number,title --jq .[] | \(.number): \(.title)
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 github-1775905508 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 github-1775905508 技能
skillhub install github-1775905508
文件大小: 1.13 KB | 发布时间: 2026-4-12 10:06