appleboy / CodeGPT

A CLI written in Go language that writes git commit messages or do a code review brief for you using ChatGPT AI (gpt-4o, gpt-4-turbo, gpt-3.5-turbo model) and automatically installs a git prepare-commit-msg hook.
MIT License
1.16k stars 100 forks source link

Specify a type of summary_prefix #90

Closed lee1221ee closed 1 year ago

lee1221ee commented 1 year ago

當我在修改 bug 時,例如下面這個例子,我忘記對 list 進行 sum,經過修正後,commit message 應該要是 fix,但 GPT 還是總結成 feat 或 refactor。

雖然我可以用 codegpt commit --amend 修改,但希望可以在 codegpt commit 時指定用哪種 summary_prefix,讓 GPT 可以針對該 prefix 生成更準確的 message。

image

appleboy commented 1 year ago

I got it. I will enhance the utilization of summary_prefix.

appleboy commented 1 year ago

@lee1221ee Try the following approach.

Update the summary prefix

codegpt commit --template_vars summarize_prefix=foobar
image

Update the commit title

codegpt commit --template_vars summarize_title=test123456