Skip to content
← Community packages

@kody/github

TrustedFeatured

by @kodyFollow @kody

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, or kent-explicit-only accounts for an operation.

Required setup

Three saved GitHub token secrets (user scope), one per account alias:

  • githubAccessTokenbot account (default for routine automation).
  • github-kentAccessTokenkent OAuth identity.
  • githubPatKentcdoddsExplicitOnly — personal token when the user explicitly requests it.

Account guide

AccountDefaultUse when
botYesRoutine automation, agent PRs, repo reads, normal API work.
kentNoKent OAuth identity for private repos or user-scoped permissions the bot lacks.
kent-explicit-onlyNoUser 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 overview
  • kody:@kody/github/accounts — account aliases and selection guidance
  • kody:@kody/github/get-viewer — identity smoke test
  • kody:@kody/github/graphql — GraphQL helper
  • kody:@kody/github/paginate — REST pagination helper
  • kody:@kody/github/request — REST request helper
  • kody:@kody/github/types — shared TypeScript types
  • kody:@kody/github/pr/get-info — fetch pull request details
  • kody:@kody/github/pr/get-checks — fetch check-run status
  • kody:@kody/github/pr/merge — merge a pull request
  • kody:@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.data

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