redline sync
Open a pull request on every registered repository whose standards are behind.
Re-renders the current standards for every repository in registry.json and opens a pull request on each one that is behind. A repository that is already current gets nothing. A repository with a sync pull request still open has that pull request updated, not a second one opened. Run it after a standards release; the redline-sync workflow runs it on a push to standards/.
Where it runs: From a built checkout of the Redline source repository (npm ci && npm run build), never from a product repository. GH_TOKEN needs contents, pull_requests and workflows write on every target; without workflows the push of .github/workflows/redline.yml is rejected.
Synopsis
redline sync [--dry-run] [--repo <owner/name>] [--force] [--concurrency <n>] [--json]Flags
| Flag | Default | What it does |
|---|---|---|
--dry-run | off | Plan and render, but push nothing and open nothing. It still reads every target, so it needs a read credential. |
--repo <owner/name> | every registered repository | One repository instead of the estate. |
--force | off | Re-render a repository already at the current standards version, for a renderer change that did not move the version. |
--concurrency <n> | 8 | Repositories in flight at once. Lower it if the host rate limits; a 429 is waited out. |
--json | off | Per-repository outcomes as JSON on stdout, with no progress lines. |
--help prints the same list from the CLI you have installed.
Examples
Preview, then sync
$ node dist/bin/redline.js sync --dry-run $ node dist/bin/redline.js sync
One repository
$ node dist/bin/redline.js sync --repo acme/web-app
Exit codes
| Code | Meaning |
|---|---|
0 | Every target synced, was current, or was skipped. |
1 | At least one repository failed. The rest of the estate still synced. |
2 | Usage error: an unknown flag or value, or a Node version below 18.11. |
Related
- Distribution and drift
- redline registry
- Who runs what
- All commands and the shared exit codes
- Source:
cli/commands/sync.ts