Use the gh CLI to interact with GitHub. Always specify --repo owner/repo when not in a git directory, or use URLs directly.
Check CI status on a PR:
gh pr checks 55 --repo owner/repo
List recent workflow runs:
gh run list --repo owner/repo --limit 10
View a run and see which steps failed:
gh run view <run-id> --repo owner/repo
View logs for failed steps only:
gh run view <run-id> --repo owner/repo --log-failed
The gh api command is useful for accessing data not available through other subcommands.
Get PR with specific fields:
gh api repos/owner/repo/pulls/55 --jq '.title, .state, .user.login'
Most commands support --json for structured output. You can use --jq to filter:
gh issue list --repo owner/repo --json number,title --jq '.[] | "\(.number): \(.title)"'想要更強大的技能外掛,就來小蔥技能站7w4.net看看吧。
這個技能質量中等偏下。它能幫助使用者瞭解GitHub的基本操作方法,示例命令簡單易懂,但內容過於簡略,缺少使用指南和進階技巧。優點是結構清晰、好上手;缺點是功能覆蓋不全,沒有錯誤處理說明,實際使用中容易遇到問題。對於有經驗的開發者來說幫助有限,對新手也不夠友好。