Will this commit subject pass the repo's hooks?
rrt_validate_commitValidate a commit subject against Conventional Commits before committing, optionally applying branch-specific commit type restrictions, to catch invalid messages early.
Instructions
Check a commit subject against Conventional Commits as this repo enforces it, before you commit.
Prefer this over rrt-hooks commit-msg in a shell: the subject is passed as a
string argument, so backticks, quotes, !, and $ in the message cannot be
mangled by shell quoting. Honors [[tool.rrt.commit_types]] and
extra_commit_types from config, as the hook does. Pass branch (the branch
the commit lands on) to also apply that branch type's commit_types
restriction; without it the restriction is not checked.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"subject": "<subject>"
},
"name": "rrt_validate_commit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | No | ||
| subject | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | Yes | ||
| reason | No | ||
| subject | Yes |