|
### GitHub API Patterns |
|
|
|
When `gh` CLI unavailable, use `curl -u "token:$GITHUB_TOKEN"` with GitHub REST API: |
|
- Create PR: `POST /repos/OWNER/REPO/pulls` |
|
- Check CI: `GET /repos/OWNER/REPO/commits/SHA/check-runs` |
|
- Use `-s` flag and parse with `jq` (never manual string parsing) |
Then we can expand on them further without polluting the context when working outside of an environment where gh is not available and the GitHub token is not provided.