.github/smartcloud.yml, change the names, and delete what you do not need.
Each file has been checked with smartcloud validate, so it works as written. After each one, a table explains why every section is there, and what it does when a run starts.
Every setup assumes the workflow from Getting started. Want to understand each section before copying? Build your settings file adds them one at a time.
A single small repository
Good for: a personal project, a small library, an internal tool. One or two people merge everything, and you want tidy labels, readable history and no pile of forgotten issues, without anyone being blocked..github/smartcloud.yml
Left out on purpose:
commits, disclosure and reviews.gate would only slow a one-person project down, and settings needs a GitHub App. Add settings later if you want the repository’s merge buttons and branch rules kept as code; see Settings.
A monorepo
Good for: one repository holding several apps and shared packages, with different people owning different parts. The problem to solve is routing: every pull request should say which parts it touches and reach the people who own them..github/smartcloud.yml
Change the package names, the team names (
@my-org/frontend) and the ^ci$ pattern to your CI job’s name. strategy: codeowners needs a CODEOWNERS file on the base branch, which the codeowners section writes for you.
An open-source project
Good for: a public project where anyone can open a pull request. You want a clear, fair bar for contributions (sign-off, disclosure of AI help, maintainer review), a welcoming first experience, and settings nobody can quietly change..github/smartcloud.yml
Things to know for an open-source project:
- Pull requests from forks run restricted. GitHub gives them a read-only token, so smartcloud cannot request reviewers or post some comments there. It records a warning instead of failing, and the checks still run. The review gate and required checks still protect the merge.
settingsneeds a GitHub App. Until you add one, the section is skipped with a notice, and everything else works. Preview the changes withsmartcloud plan settings.secretScanningandprivateVulnerabilityReportingonly apply to public repositories. On a private one smartcloud leaves them and records a notice.- Write the pull request template first.
disclosureexpects theAI level:,AI tools:,Accountable human:andHuman review:fields; see Disclosure.
An organisation with a shared preset
Good for: an organisation with many repositories that should all follow the same rules. The shared rules live once, in a preset in the organisation’s.github repository, and each repository’s own file holds only what makes it different.
The preset, in my-org/.github:
my-org/.github/smartcloud/base.yml
.github/smartcloud.yml
How the two files combine, and what you may and may not do in the repository’s file:
- The preset is read first, then the repository’s file is laid on top (How files are merged).
- Adding is fine: a new label, a new rule, a key the preset left unset (such as
settings.environments), a new entry in a map (such assettings.ruleset.statusChecks.checks.ci). - Changing is not: giving
labels.bug.coloranother value, or a differentroles.maintainerslist, fails the run withcannot change "...": it is set by .... Change the preset instead, and every repository follows. - Leave keys unset in the preset on purpose when each repository must decide them, and say so in a comment at the top of the preset.
.github repository public, or use a GitHub App installed on every repository; settings and sync need the app either way. Your organisation’s sync hub sets all of this up step by step.
Next steps
Build your settings file
Every section in the order to add it, and what each does when it runs.
Your organisation's sync hub
Make your own .github repository the source of presets and shared files.