docs(#141): add validate-docmap subcommand to README
CI / test (pull_request) Successful in 18s
CI / review (anthropic--claude-4.6-sonnet, sonnet, SONNET_REVIEW_TOKEN) (pull_request) Successful in 30s
CI / review (gpt-5, security, ., rodin/security-patterns, SECURITY_REVIEW.md, SECURITY_REVIEW_TOKEN) (pull_request) Successful in 1m11s
CI / review (gpt-5, gpt, GPT_REVIEW_TOKEN) (pull_request) Successful in 1m41s
CI / test (pull_request) Successful in 18s
CI / review (anthropic--claude-4.6-sonnet, sonnet, SONNET_REVIEW_TOKEN) (pull_request) Successful in 30s
CI / review (gpt-5, security, ., rodin/security-patterns, SECURITY_REVIEW.md, SECURITY_REVIEW_TOKEN) (pull_request) Successful in 1m11s
CI / review (gpt-5, gpt, GPT_REVIEW_TOKEN) (pull_request) Successful in 1m41s
Documents the new validate-docmap subcommand under a new '## Subcommands' section, alongside the existing validate-url documentation.
This commit is contained in:
@@ -296,6 +296,40 @@ review-bot \
|
|||||||
--conventions-file CONVENTIONS.md
|
--conventions-file CONVENTIONS.md
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Subcommands
|
||||||
|
|
||||||
|
### `validate-docmap`
|
||||||
|
|
||||||
|
Verifies that a `doc-map.yml` is consistent before running a review. Two checks:
|
||||||
|
|
||||||
|
1. **Coverage**: every changed file is matched by at least one `paths:` glob.
|
||||||
|
2. **Stale docs**: every `docs:` entry exists on disk under `--repo-root`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Typical CI usage — pipe git diff into the command
|
||||||
|
git diff --name-only origin/main HEAD | \
|
||||||
|
review-bot validate-docmap \
|
||||||
|
--docmap .review-bot/doc-map.yml \
|
||||||
|
--repo-root .
|
||||||
|
```
|
||||||
|
|
||||||
|
| Flag | Required | Default | Description |
|
||||||
|
|------|----------|---------|-------------|
|
||||||
|
| `--docmap` | Yes | — | Path to doc-map YAML file |
|
||||||
|
| `--repo-root` | No | `.` (cwd) | Root for resolving `docs:` paths |
|
||||||
|
|
||||||
|
Exit codes: `0`=clean, `1`=failures found, `2`=usage/parse error.
|
||||||
|
|
||||||
|
### `validate-url`
|
||||||
|
|
||||||
|
Resolves a URL and verifies all IPs are publicly routable (used in CI to prevent SSRF).
|
||||||
|
|
||||||
|
```bash
|
||||||
|
review-bot validate-url https://gitea.example.com
|
||||||
|
```
|
||||||
|
|
||||||
|
Exit codes: `0`=safe, `1`=blocked/private IP, `2`=error.
|
||||||
|
|
||||||
## Environment Variables
|
## Environment Variables
|
||||||
|
|
||||||
All flags have environment variable equivalents:
|
All flags have environment variable equivalents:
|
||||||
|
|||||||
Reference in New Issue
Block a user