Skip to main content
smartcloud is a GitHub Action that automates repository housekeeping and enforces contribution policy from one declarative file, .github/smartcloud.yml. It labels pull requests and issues, checks titles and commits, gates reviews, marks inactive work stale, keeps repository settings in line, and syncs shared files from a template repository. Each capability is a feature with its own section in the config. A feature whose section is absent does not run, so you opt in to exactly what you need.

Configuration

The config file, shared presets and the “add, never change” rule.

Conditions

The condition language that labelling, conventions and reviews use.

Reporting

Check runs, the single comment and the job summary.

Migrating from v1

Convert .github/config.json with smartcloud migrate.

Quick start

1

Write a config

Create .github/smartcloud.yml. This one keeps two labels in sync, labels documentation changes, and asks for conventional commit titles:
.github/smartcloud.yml
The first line points editors at the JSON Schema, so they complete and check keys as you type.
2

Check it locally

Validation reads every preset the config extends and reports anything the schema rejects. See CLI for how to run it.
3

Add the workflow

Add a workflow that runs smartcloud on the events its features act on:
.github/workflows/smartcloud.yml

Permissions

The settings feature changes repository administration settings, and the sync feature reads its source from another repository and may push workflow files, which the workflow token cannot do. Pass a stronger token as GITHUB_TOKEN, with the workflow token as the fallback. A GitHub App token is best: GitHub signs the commits smartcloud makes with it, it can create check runs, and its rate limit is the app’s own. Mint it with actions/create-github-app-token, and skip that step where the key is missing, as on forks and Dependabot runs:
Never mint the token in a job that runs pull request code; smartcloud’s own job runs a release, not the pull request.
A run with only the workflow token is restricted rather than failed: smartcloud skips settings, sync, private presets in other repositories and every write GitHub refuses, and lists them in the job summary. Pull requests from forks, and Dependabot’s runs and pull requests (even when a person reviews them), are always restricted, whatever token the workflow passes; see Restricted runs.

Action inputs

Every input is optional. The config is read through the GitHub API, so the workflow needs no checkout step. It comes from the default branch unless configRef says otherwise, so a pull request cannot loosen the rules it is checked against. The run fails when any finding is an error or a feature fails to run. Any other failure, such as a missing config, is one error annotation, never a stack trace. The v1 inputs fillEmpty and skipDelete are still accepted and ignored with a warning. See Migrating from v1.

Which events run which features

Any other event is a clean no-op that records a notice. A comment on a pull request carries no pull request data, so smartcloud acts on the pull request events instead.
Last modified on September 27, 2026