Developer tools
GitHub mock API
Stateful GitHub REST replica: user, orgs, repositories, issues and comments, pull requests with merge, labels, branches, repository webhooks with signed deliveries and rate-limit headers.
At a glance
- Operations
- 1281
- Stateful operations
- 29
- Stateful resources
- 9
- Webhook events
- 4
- Vendor API version
- 2022-11-28
- Verification
- Spec-verified
How it works
Use GitHub without calling GitHub, Inc.
- Install the mock from the library into a workspace. It runs as a virtual service.
- Point your client's base URL at the virtual service instead of the vendor.
- Authenticate the way you already do. The mock accepts the same credential shape:
Authorization: Bearer ghp_MockToken0123456789 State
Resources that remember
Writes persist per caller, so a create followed by a read returns what you created.
| Resource | Operations |
|---|---|
| User | 1 |
| Organizations | 1 |
| Repositories | 7 |
| Issues and comments | 6 |
| Pull requests | 4 |
| Labels | 4 |
| Branches | 2 |
| Repository webhooks | 5 |
| Rate limit | 1 |
Webhooks
Events your handlers can receive
- issues
- issue_comment
- pull_request
- ping
Deliveries are signed with the hmac scheme, so your verification code runs unchanged.
Coverage
1281 operations
29 of them are stateful. The largest groups:
| Group | Operations |
|---|---|
| Other operations | 1250 |
| Repositories | 7 |
| Issues and comments | 6 |
| Repository webhooks | 5 |
| Labels | 4 |
| Pull requests | 4 |
Verification
Spec-verified
Generated operations are checked against the vendor OpenAPI description, which proves shape and routing. Stateful operations and scenario suites prove behaviour. Responses are not yet compared with a live vendor sandbox.
17 operations cannot be checked against the specification.
Source and limits
License, source and limits
- Generated from the GitHub, Inc. API description, licensed under MIT.
- GitHub, Inc. API documentation
- Source specification
Each collection holds up to 1 MiB of objects per token; writes beyond that are dropped (x-maxoperf-vs-state: capacity). Only the core resources are stateful (the other ~1,000 GitHub operations answer with schema-valid stateless responses). Issues and pull requests share one per-repository number sequence. Repository webhooks deliver ping, issues, issue_comment and pull_request events signed with X-Hub-Signature-256. Repository webhooks fan out per token: a hook receives matching events from every repository of that token, not only its own. Deleting a repository does not cascade to its issues, pull requests or labels; the issues list filter takes one label name. Rate-limit headers are sent by the stateful operations. The mock does not enforce real rate limits (x-ratelimit headers are static) and does not model git content, forks, reviews or checks.
MaxoPerf is not affiliated with, endorsed by, or sponsored by GitHub, Inc. GitHub is a trademark of its owner.