generate_and_commit
Generate conventional commit messages and optionally execute commits in one step. Streamline Git workflows by combining message generation with repository operations using type, subject, and optional details like scope, body, and footer.
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 |