Skip to content

Built for people who want to own their automations. Join the waitlist for an invite.

Package listing

@kentcdodds/github

src/accounts.ts

24 lines · 719 B · TypeScript
export type { GitHubAccount, GitHubAccountInfo } from "./types"
export {
  DEFAULT_GITHUB_ACCOUNT,
  accounts,
  getAccountInfo,
  resolveIntegrationName,
} from "./core"
import { accounts } from "./core"

/**
 * List GitHub account aliases and selection guidance.
 *
 * `bot` (kody-bot via `github-bot`) is the default. `kent` (Kent C. Dodds via
 * `github-kent`) requires an explicit user request.
 *
 * @returns Array of account metadata (`bot`, `kent`).
 * @example
 * import listGithubAccounts from 'kody:@kentcdodds/github/accounts'
 * const accounts = listGithubAccounts()
 * // => [{ account: 'bot', default: true, useWhen: '...' }, ...]
 */
export default function listGithubAccounts() {
  return accounts()
}