@deploybaseline/github
v0.14.0
Published
GitHub REST API emulator: users, repos, issues, PRs, comments, reviews, labels, milestones, branches, git data, orgs, teams, releases, webhooks, search, actions, checks, and rate limit, plus GraphQL, OAuth Apps, and GitHub Apps.
Readme
@deploybaseline/github
GitHub REST API emulator: users, repos, issues, PRs, comments, reviews, labels, milestones, branches, git data, orgs, teams, releases, webhooks, search, actions, checks, and rate limit, plus GraphQL, OAuth Apps, and GitHub Apps.
Part of Baseline: local drop-in replacement services for CI and no-network sandboxes.
Usage
npx @deploybaseline/cli start --service githubimport { createEmulator } from "@deploybaseline/cli";
const github = await createEmulator({ service: "github" });
// Point your GitHub client at github.url
await github.close();With Octokit:
import { Octokit } from "@octokit/rest";
const octokit = new Octokit({ baseUrl: github.url, auth: "test_token_admin" });
const { data } = await octokit.rest.repos.get({ owner: "octocat", repo: "hello-world" });Documentation
- GitHub docs: routes, seed config, OAuth and GitHub Apps, Actions jobs, artifacts and caches, GraphQL, and limits
- API reference:
http://localhost:3999/docs/githubwhile the CLI runs (how it works)
License
Apache-2.0
