generate_and_commit
Automate commit message generation and execution in one step. Specifies type, subject, optional details, and repository path, then previews or completes the commit.
Instructions
Generate commit message and optionally execute commit in one step.
Combines message generation with git operations for streamlined workflow.
Args: type: Commit type (feat, fix, docs, etc.) subject: Commit subject/description repo_path: Path to git repository body: Optional detailed description scope: Optional scope of changes breaking: Whether this is a breaking change footer: Optional footer (e.g., issue references) stage_all: Whether to stage all changes (not implemented yet) sign_off: Whether to add sign-off to commit (default: True) preview_only: If True, only preview (default for safety)
Returns: Dict containing: - message: Generated commit message - is_valid: Whether message is valid - git_preview: Preview of git operation (if preview_only=True) - commit_result: Commit execution result (if preview_only=False)
Input Schema
Name | Required | Description | Default |
---|---|---|---|
body | No | ||
breaking | No | ||
footer | No | ||
preview_only | No | ||
repo_path | Yes | ||
scope | No | ||
sign_off | No | ||
stage_all | No | ||
subject | Yes | ||
type | Yes |