git_commit_and_push
Automates Git commits by detecting changes, generating conventional commit messages, staging, committing, and optionally pushing to remote repositories while updating CHANGELOG.
Instructions
Track changes, generate commit message, commit, and optionally push.
This tool automates the Git commit workflow by:
Detecting all changes in the repository
Generating a conventional commit message
Staging and committing the changes
Optionally pushing to remote (if confirm_push is True)
Updating the CHANGELOG.md file
Supports both local repositories and remote repository URLs. For remote repositories, the tool will clone them to a workspace and perform operations there.
Args: repository_path: Path to the Git repository or remote URL (default: current directory) Supports: - Local paths: ".", "/path/to/repo", "relative/path" - SSH URLs: "git@github.com:user/repo.git" - HTTPS URLs: "https://github.com/user/repo.git" confirm_push: Whether to push to remote after committing (default: False)
Returns: Dictionary containing commit result information: - success: Whether the operation completed successfully - commit_hash: The SHA hash of the created commit - commit_message: The full commit message used - files_changed: Number of files affected - pushed: Whether the commit was pushed to remote - changelog_updated: Whether CHANGELOG.md was updated - message: Human-readable status message - error: Error message if operation failed
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm_push | No | ||
| repository_path | No | . |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||