validate_repository_state
Validate commit message, branch, author, and push safety of a local git repository in one read-only call. Ensure repository state meets your standards before commits or deployments.
Instructions
Validate the current repository state including latest commit message, active branch, author metadata, and optional push safety. Read-only validation. Reads git data (message, branch, author) from the local repository. Returns a structured result with overall status and per-check results.
Use this to validate the entire state of a local git repository in one call — ideal for pre-commit or CI hooks. Controls which checks run via boolean include_* flags. For validating arbitrary (non-repo) values, use validate_commit_context or individual validation tools instead.
Parameters:
repo_path (optional): Path to the git repository. If omitted, uses current working directory.
config (optional): Inline JSON config overrides on top of any loaded config file.
config_path (optional): Path to a custom commit-check TOML config file.
include_message (optional, default true): Whether to validate the latest commit message.
include_branch (optional, default true): Whether to validate the current branch name.
include_author (optional, default true): Whether to validate the latest commit author.
include_push (optional, default false): Whether to validate push safety.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config | No | ||
| repo_path | No | ||
| config_path | No | ||
| include_push | No | ||
| include_author | No | ||
| include_branch | No | ||
| include_message | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||