Skip to content

Move GitHub access pattern using the GitHub token to a SessionStart Claude Code hook #125

@Jython1415

Description

@Jython1415

named-functions/CLAUDE.md

Lines 215 to 220 in 3198ce3

### 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions