README.md
43 lines · 1.9 KB · Markdown@kentcdodds/github
Intent
One GitHub helpers package for Kody agents, with two BYO OAuth identities:
kody-bot (account: 'bot', integration github-bot) is the default for
every call; Kent C. Dodds (account: 'kent', integration github-kent) is
used only when the user explicitly asks to act as Kent. Agents must not infer
Kent from private repos, org access, or “the bot might not have permission.”
What it does
- Authenticated GitHub REST and GraphQL calls (
request,graphql,paginate) - Identity check for the selected account (
get-viewer) - Pull request helpers: info, CI checks, merge (bounded + durable escalation), draft/ready toggle
- Create or update GitHub Actions secrets without returning plaintext
(
actions/put-secret)
Prerequisites / setup
Two user-owned GitHub OAuth connections to the same BYO GitHub OAuth app (not
the Kody platform app), both with god-level scopes (gist, notifications,
read:org, read:user, repo, user:email, workflow):
- Connect
github-botwhile signed into GitHub as kody-bot (default). - Connect
github-kentwhile signed into GitHub as kentcdodds (explicit Kent-only). - Reconnect if needed:
/connect/oauth?provider=github-botor/connect/oauth?provider=github-kent. - Agents: see
AGENTS.mdfor import paths and smoke checks.
OAuth access/refresh tokens live on the saved integrations (github-bot,
github-kent). Helpers authenticate with createAuthenticatedFetch — never
paste token values in chat, and do not require mirrored user secrets named
github-botAccessToken / github-kentAccessToken.
Done when
- Both OAuth connections work;
get-viewerforbotreturns kody-bot kentis used only after an explicit user request- REST/GraphQL and PR helpers succeed with the intended account
- Actions secrets can be put without plaintext ever leaving the helper