Validate branch name
validate_branch_nameValidate a branch name against configured naming conventions and optional base branch rules, returning a pass/fail/skip status with detailed check results.
Instructions
Validate a branch name against the configured naming convention (e.g. feature/, bugfix/) and, when configured, that the branch is based on the required merge base. Read-only.
Returns {status, warnings, checks[]}. status is 'pass', 'fail' or 'skip': only 'fail' is a rejection; 'skip' means every check skipped, so nothing was validated and the result is not approval. warnings is the number of checks with status 'warn'. Each check has: rule_id (stable rule id, e.g. 'CC001'); check (rule name, e.g. 'message'); status 'pass' | 'fail' | 'warn' | 'skip' ('warn' = the config lists the check under warn, so the finding is reported without failing the run; 'skip' = the rule did not run, e.g. the author is in ignore_authors or there was nothing to check); value (what was checked); error (why it failed); suggest (advice for a person); fix (the corrected value when the correction is unambiguous, else ''); docs_url (documentation for the rule). On 'fail', apply a non-empty fix verbatim; when fix is '', rewrite following suggest; then validate again.
Use this before creating or pushing a branch. Omit branch to check the branch currently checked out in repo_path. For combined message+branch+author validation use validate_commit_context.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | No | Branch name to validate, e.g. 'feature/login'. Omit to validate the branch currently checked out in repo_path, which must then be a git repository. Must be non-empty when provided. | |
| config | No | Inline commit-check config overrides as a JSON object, merged on top of the built-in defaults and any config file, e.g. {"warn": ["message"]} or {"commit": {"require_body": true}}. | |
| repo_path | No | Path to the git repository to validate against. Its cchk.toml or commit-check.toml (also looked up under .github/) is loaded, and a relative config_path is resolved from it. Omit to use the server's working directory. | |
| config_path | No | Path to a commit-check TOML config file, used instead of the repository's own cchk.toml/commit-check.toml; a relative path is resolved from repo_path. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||