redline verify
Check the repository and its host settings still match what .redline.json claims.
Checks that the repository still matches what .redline.json records: the gate still publishes its check, the branch policy is still enforced, the security floor is still on, and the rendered assistant files are not stale. Run it after a re-onboard, after someone changes repository settings, or when a pull request is not being gated as you expect. With --gate it is the merge gate itself in Azure Pipelines.
Where it runs: Inside the product repository, through the copy pinned in its devDependencies. It reads host settings, so it needs a credential. With --repo it checks any repository over the API, with no checkout.
Synopsis
redline verify [--gate] [--repo <owner/name>] [--json]Flags
| Flag | Default | What it does |
|---|---|---|
--repo <owner/name> | this checkout | Check a repository over the API. A check that needs a working tree reports ?? instead of passing, and ?? never fails the run. |
--gate | off | Run as the merge gate in CI. A setting the build identity cannot see does not fail the pull request. Ends on a pass/fail line. Not with --repo. |
--json | off | The whole report as JSON on stdout. |
--help prints the same list from the CLI you have installed.
Examples
In a repository that was never onboarded
$ pnpm redline verify FAIL onboarded no /path/to/repo/.redline.json — run: npx redlinegate init
$ npx redlinegate verify FAIL onboarded no /path/to/repo/.redline.json — run: npx redlinegate init
$ yarn redline verify FAIL onboarded no /path/to/repo/.redline.json — run: npx redlinegate init
$ bun run redline verify FAIL onboarded no /path/to/repo/.redline.json — run: npx redlinegate init
Another repository, without cloning it
$ pnpm redline verify --repo acme/web-app
$ npx redlinegate verify --repo acme/web-app
$ yarn redline verify --repo acme/web-app
$ bun run redline verify --repo acme/web-app
Exit codes
| Code | Meaning |
|---|---|
0 | Every check passed or could not run (??). |
1 | Drift: at least one check is FAIL. |
2 | The repository was never onboarded, there is no git remote, or a usage error. |
3 / 4 | The host refused the credential, or could not be reached. |
Related
- Distribution and drift
- The merge gate
- redline status
- All commands and the shared exit codes
- Source:
cli/commands/verify.ts