Appearance
Guides
The documentation for GitHub Settings as Code, in five groups. Start here if the README told you what the action does and you want to know how to put it to work: the start pages are enough to get a repository under management, and the rest are there when their topic comes up.
Pick by goal
Getting started
Get one repository under managementstart/getting-started.md
Show 7 headings on Getting started
Migrating from the Probot Settings app
Replace the Probot Settings appstart/migrating-from-probot.md
Show 8 headings on Migrating from the Probot Settings app
Examples
Copy a settings.yml shapestart/examples.md
Show 6 headings on Examples
Sections
Look up what a section manages and deletesreference/sections.md
Show 2 headings on Sections
Coverage
Look up every call a section makes, and what has no APIreference/coverage.md
Show 5 headings on Coverage
Inputs and outputs
Look up an input or outputreference/inputs.md
Show 3 headings on Inputs and outputs
Token permissions
Scope the tokenreference/permissions.md
Show 4 headings on Token permissions
Semantics
Predict what an apply or a check will doreference/semantics.md
Show 5 headings on Semantics
Architecture
See how the action works, module by modulereference/architecture.md
Show 9 headings on Architecture
Library
Use the engine from your own codereference/library.md
Show 16 headings on Library
Command line
Run check, apply, or validate from a terminalstart/cli.md
Show 11 headings on Command line
Check mode
Detect drift on a scheduleoperate/check-mode.md
Show 5 headings on Check mode
Snapshot mode
Write a repository's live settings to a fileoperate/snapshot.md
Show 9 headings on Snapshot mode
Layering settings files
Fold several settings files into oneoperate/layering.md
Show 11 headings on Layering settings files
Multi-repo mode
Manage a fleet from one repositoryoperate/multi-repo.md
Show 5 headings on Multi-repo mode
Private repositories
Keep private targets out of public logsoperate/private-repositories.md
Show 5 headings on Private repositories
Troubleshooting
Read a failing runoperate/troubleshooting.md
Show 10 headings on Troubleshooting
Upgrading
Move to a new major versionupgrading/README.md
Show 4 headings on Upgrading
Playbooks
Show 9 pages in playbooks/
Reference
Show 3 pages in reference/
Upgrading
Show 2 pages in upgrading/
start: getting a repository under management
- Getting started: create the PAT, add the workflow, run your first check, and read the drift output.
- Migrating from the Probot Settings app: the step-by-step move, including the parts that changed on purpose and an org-scale shadow run.
- Examples: a settings.yml cookbook, from a minimal file to a full-featured one, including what
nullmeans where it is meaningful. - Command line: the
github-settings-as-codeandgsaccommands in the npm package, one per action mode plusvalidateandpermissions, their flags, outputs, and exit codes.
reference: the normative model
- Sections: every section with its endpoints, PAT permission, undeclared default, and notes.
- Coverage: every supported area with one link per call it makes, the facts behind each, the repo-scoped gaps, and what has no public API or is out of scope.
- Inputs and outputs: every
with:input with its default, and theresult,skipped-sections, andrepos-resultoutputs. - Semantics: stateless, declared-keys-only, convergent applies, softenable errors, retries, and the preflight barrier.
- Architecture: how the action works in diagrams, from one settings file's journey to the module map, each pinned to the code.
- Token permissions: which grant each section needs, how a denial surfaces, and the
on-missing-permission/required-sectionspolicy. - The undeclared policy: the
_undeclaredknob on the list sections, per-section defaults, the milestone-deletion caveat, and how the policy layers inmode: render. - Forward compatibility: where payloads pass through verbatim and which sections are deliberately closed.
- Secrets and vaults: the
$NAMEreferences secret fields take, wiring them from GitHub Secrets or a vault action, and what check mode can and cannot verify. - Library: the npm package
@vivswan/github-settings-as-code, how it is built, the API by group with one example each, and how its version tracks the action's.
operate: day-to-day operation
- Check mode: drift detection on a schedule, exit codes, and what a "cannot verify" note is telling you.
- Snapshot mode:
mode: snapshotwrites the live settings as a settings file, the$NAMEplaceholders secrets become, the round trip and its exceptions, and the per-repo directory form. - Layering settings files:
mode: renderfolds an ordered list of files into one document, the rules of the fold, the_layeringdirective, and the two-step workflow. - Multi-repo mode: manage a fleet from one admin repository with per-repo files, discovery, and a defaults-file fallback for repositories without a file.
- Private repositories: the redaction that keeps private targets out of public logs, and the private-report channels.
- Troubleshooting: permission denials, ambiguous 403s, rate limits, debug logging, and a missing or stale bundle.
playbooks: complete workflows to adapt
The playbooks compose the pieces above into end-to-end setups: ring rollouts, change previews, trust tiers between tokens, audit evidence, incident freeze, and decommissioning.
upgrading: one guide per major
Upgrading explains how the moving tags work and holds one page per major: v1 to v2 and v2 to v3, each break as a row with its before, after, and the error the old form now produces.
Where the facts live
Generated regions carry the load-bearing facts. Each is rendered from its declarations or generator data by bun run build:docs, bun run build:action-docs, and bun run build:inputs-table, and build:check fails when a committed page drifts:
- the Sections table and the
resultvalues on the inputs page; - the Inputs table, which action-docs renders from
action.yml; - the Coverage tables and notes, the per-section detail behind the Sections table;
- the defaults table and count in undeclared policy;
- the grant sentence and gated-read bullets in permissions and check mode;
- the module map in architecture, rendered from
architecture.yml, whichbun run lint:archkeeps equal to the import graph.
Contract tests pin the remaining authored claims in forward compatibility, private repositories, and troubleshooting: the commands and enumerations that must not drift. The rest is walkthrough prose. When a walkthrough disagrees with a generated or pinned claim, the claim wins, so guides link to the claims rather than duplicating their exact wording.
The settings examples in these pages are validated in CI against the real schema (test/docs/guides.test.ts): every fenced block tagged yaml settings must be a valid settings document, every block tagged yaml layer must validate as one layer of a merge (nulls stripped first, as the render step does), and a settings-shaped block without a tag fails the build. Every mermaid diagram must name real files and exported symbols and link the test that demonstrates it (test/docs/diagrams.test.ts). If you edit a guide, tag your example blocks.