github in twins and put this configuration under seed_config.github.
GitHub with repos, users, orgs, branch file contents, issues, and pull requests.
Example seed
This is the complete Scenario request body for creating a Scenario. You can also import it witharga test-runner scenarios import --file scenario.json.
Parameters
The following fields belong directly insideseed_config.github. Required nested fields are marked in their tables. Provider-native objects can contain service-specific fields beyond the representative record shapes below.
Seeding behavior
Usegithub for new GitHub and GitHub Actions fixtures. app accepts only permissions and events. Repository imports accept a public HTTPS GitHub URL or owner/repo; pin source_ref to a commit for repeatable imports. actions_execution replays configured outcomes without executing shell commands. See GitHub Actions for execution-mode behavior.
Resource fields
These tables describe the record shapes used by the example. Keep native field names and casing. Map keys such as property names, IDs, and metadata keys are supplied by your fixture.users[]
orgs[]
repos[]
repos[].actions_artifacts.artifacts[]
repos[].files[]
repos[].branches[]
repos[].labels[]
repos[].issues[]
repos[].prs[]
repos[].prs[].files[]
API coverage and limitations
Twin name:github
Supports
- GitHub Actions workflows, runs, jobs, logs, and artifacts in the same GitHub twin. Simulation is the default; eligible internal accounts can enable real execution for supported workflows in private environments.
- GitHub REST API operations for repositories, branch-aware file contents, pull requests, issues, branches, commits, check runs, check suites, git references, labels, pull request reviews, review comments, commit statuses, search, organizations, users, and webhooks.
- Raw file downloads served as public content (no bearer token required) for both
https://raw.githubusercontent.com/{owner}/{repo}/{ref}/{path}andhttps://github.com/{owner}/{repo}/raw/{ref}/{path}. The twin gateway interceptsraw.githubusercontent.comand the resolver matches the longest known branch prefix so slash-containing branch names (for example,feature/deep) andrefs/heads/.../HEAD/...refs are handled correctly. Responses use the file’s guessed MIME type (defaulting toapplication/octet-stream). - GitHub App endpoints for installations, access tokens, repository listings, app metadata (
GET /app,GET /apps/{app_slug}), and the GitHub App manifest registration flow for creating multiple GitHub Apps at runtime (GET/POST /settings/apps/new,GET/POST /organizations/{org}/settings/apps/new,POST /app-manifests/{code}/conversions). - Multi-app support: each installation is scoped to its owning GitHub App, JWT and installation tokens resolve the correct app, and per-app bot users, webhook secrets, and RSA key pairs are tracked independently.
- Deterministic seeding for repos, files, issues, PRs, checks, and GitHub App configuration.
- Token authentication, OAuth flows, scope enforcement, signed webhook delivery, admin state export, and stub-hit tracking.
- GitHub CLI (
gh) and GitHub MCP server compatibility. The twin accepts requests at the standardapi.github.compaths as well as the GitHub Enterprise-style/api/v3/...REST prefix and the/api/graphqlendpoint, soghand MCP clients can be pointed at the twin’s base URL without code changes. - Extended REST coverage used by
ghand the MCP server:GET /meta,GET /rate_limit,GET /zen,GET /api/v3, repository archives (/zipball/{ref},/tarball/{ref}), releases, search for repositories, users, issues, and code, gists (list, get, create, update, delete), notifications and thread subscriptions, projects v2 (org and user fields and items), org and repo Actions workflows, workflow runs, jobs, and artifacts, Actions cache, variables, and secrets, codespaces (list, get, update, stop, delete, ports), user SSH and signing keys, GPG keys, starred repositories, sub-issues and issue types, repository security advisories, global security advisories, Dependabot alerts, code scanning alerts, and secret scanning alerts. - GraphQL surface at
POST /graphql(also reachable throughPOST /api/graphql) covering the queries and mutations used byghand the GitHub MCP server, includingviewer, repository, issue, and pull request lookups, search, and the corresponding mutations backed by the same store as the REST handlers.
- Provision the
githubtwin and seed at least one user or organization plus the repositories your app should see. - Point your app’s GitHub API and web URLs at the provisioned twin. The wizard handles the standard
api.github.com,github.com, andraw.githubusercontent.comrewrites automatically. - Register a GitHub App with the manifest flow at
GETorPOST <github_twin_url>/settings/apps/new, or useGETorPOST <github_twin_url>/organizations/{org}/settings/apps/newfor an org-owned app. Exchange the returned code withPOST <github_twin_url>/app-manifests/{code}/conversionsto receive the app id, client id, client secret, webhook secret, and PEM private key. - Install the app through the browser flow at
<github_twin_url>/apps/{app_slug}/installations/new. Choose the account, repository access, optional webhook URL, and optional webhook secret. - For a programmatic setup, create the installation with
POST <github_twin_url>/admin/installationsusingaccount,app_slugorapp_id,repository_selection, optionalrepositories, optionalwebhook_url, and optionalwebhook_secret. - From your app, sign a GitHub App JWT with the returned private key, call
POST /app/installations/{installation_id}/access_tokens, and use the returned installation token for repository, issue, PR, check, and webhook workflows.
- Endpoints without a full stateful implementation return explicit stub responses with
X-Twin-Stub,_twin_stub, and_twin_warning. - Stub hits can be audited through
GET <admin_url>/admin/stub-hitsand cleared withPOST <admin_url>/admin/stub-hits/clear. - The GraphQL surface targets the operations used by
ghand the official GitHub MCP server. Queries and mutations outside that set may return structured stub responses. - Strict 100% live
ghand MCP coverage is gated by external GitHub fixtures and explicit mutation consent flags. Thescripts/validate_github_cli_mcp_compat.pyverifier reports any remaining blockers directly. - Actions API coverage and seeded success results do not imply real workflow execution. The optional execution worker supports a bounded workflow subset, rather than complete GitHub-hosted-runner compatibility.
get_twin_catalog, provision_twins, start_url_validation, get_validation_results.
See Scenario seeding for saving, provisioning, and resetting fixtures.
