the-cafe / git-ai-commit

let AI write your commit messages
https://pypi.org/project/git-ai-commit/
38 stars 0 forks source link

Add `git-ai-command summary` command #50

Closed ming1in closed 1 month ago

ming1in commented 1 month ago

Description

The git-ai-command summary command will simply provide a commit message or concise summary of local staged/unstaged changes.

This diff adds two command I couldn't pick between which word to use. would love to get reviewers opinions

Test Plan

build and install local changes

pip install . && pre-commit install && pre-commit autoupdate

Run the new command to summarize all your unstaged changes

> git-ai-commit summary --unstaged                            
Fetching your unstaged changes...

Here is a summary of your changes:

  ✨fix summary_handler to use stdout from diff command

to use this summary run: `git commit -m "✨fix summary_handler to use stdout from diff command"

Run the new command to summarize all your staged changes

> git-ai-commit summarize                                     
Fetching your staged changes...

Here is a summary of your changes:

  ✨fix stdout usage in generate_commit_message calls

to use this summary run: `git commit -m "✨fix stdout usage in generate_commit_message calls"`