gh CLI
Use gh for all GitHub interactions. It handles authentication automatically and works with private repositories.
Common Commands
gh repo view— view repository README and metadatagh issue view <number>— view issue detailsgh pr view <number>— view pull request detailsgh run view <run_id>— view workflow run statusgh run view --job <job_id> --log— view job logs
API Access
Use gh api for operations not covered by built-in commands:
gh api repos/{owner}/{repo}/contents/{path} # fetch file contents
gh api repos/{owner}/{repo}/pulls/{number}/comments # PR review comments
Reference Files
- reviews.md: Pull request review patterns
Workflows
Pull Request
- You must
git pusha branch before creating a pull request withgh pr create.