GitHub REST, GraphQL, and pull request helpers for Kody agents.
- github
- api
- accounts
- pr
- automation
- License
- MIT
- Published
- July 20, 2026
- Pinned commit
7b11cb3- Rating
- ★ 5.0 (1)
- Forks
- 10
- Stars
- 1
- Adaptation effort
- 2.0
One-click install
Install forks this package into your account and publishes it right away when it passes the standard package checks. An admin reviewed and trusted this exact version.
Log in to install this package.
Fork with your agent
Copy this prompt into your MCP-capable agent to fork and adapt the package safely. Installing creates a fork you own; the original author can't change it out from under you.
Use Kody to fork the community package "@kody/github" (listing id: 5ee4e845-54c5-4bd5-80b5-3d4557847a2d). Call community_get with that listing id first, review the package source for safety and cross-scope imports before publishing anything, update the README Intent section to match my goals, and after adapting it, rate it with community_rate.
README
@kody/github
Intent
Account-aware GitHub REST, GraphQL, and pull request helpers for Kody agents — centralizes credential selection, headers, parsing, and pagination so agents do not hand-roll GitHub API glue.
When To Use
- Make GitHub REST or GraphQL calls with the correct saved credential (
request,graphql,paginate). - Verify which GitHub identity will perform an action (
get-viewer). - Fetch PR details, CI checks, merge, or change draft/ready status (
pr/*exports). - Choose between
bot,kent, orkent-explicit-onlyaccounts for an operation.
Required setup
Three saved GitHub token secrets (user scope), one per account alias:
githubAccessToken—botaccount (default for routine automation).github-kentAccessToken—kentOAuth identity.githubPatKentcdoddsExplicitOnly— personal token when the user explicitly requests it.
Account guide
| Account | Default | Use when |
|---|---|---|
bot | Yes | Routine automation, agent PRs, repo reads, normal API work. |
kent | No | Kent OAuth identity for private repos or user-scoped permissions the bot lacks. |
kent-explicit-only | No | User explicitly asks for the personal kentcdodds token. |
All PR helpers accept optional account (default 'bot'). PR locators: { prUrl } or { owner, repo, prNumber } (number aliases prNumber).
Exports
kody:@kody/github— package overviewkody:@kody/github/accounts— account aliases and selection guidancekody:@kody/github/get-viewer— identity smoke testkody:@kody/github/graphql— GraphQL helperkody:@kody/github/paginate— REST pagination helperkody:@kody/github/request— REST request helperkody:@kody/github/types— shared TypeScript typeskody:@kody/github/pr/get-info— fetch pull request detailskody:@kody/github/pr/get-checks— fetch check-run statuskody:@kody/github/pr/merge— merge a pull requestkody:@kody/github/pr/set-review-status— set draft, ready-for-review, or toggle (status: 'toggle')
Examples
REST request:
import githubRequest from 'kody:@kody/github/request'
const response = await githubRequest({
account: 'bot',
path: '/repos/kentcdodds/kody',
throwOnError: true,
})
return response.dataPR info with account:
import getPrInfo from 'kody:@kody/github/pr/get-info'
return await getPrInfo({
owner: 'kentcdodds',
repo: 'kentcdodds.com',
prNumber: 1,
account: 'bot',
})Stars
1 star
Log in to star this package.
Report this listing
Log in to report this listing.