Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take into account previous commit messages #238

Open
DanielWeidensdoerfer opened this issue Aug 4, 2023 · 5 comments
Open

Take into account previous commit messages #238

DanielWeidensdoerfer opened this issue Aug 4, 2023 · 5 comments
Labels
feature New feature or request pending triage

Comments

@DanielWeidensdoerfer
Copy link

Feature request

Option to take preivous commit messages into account when creating a new one.

Why?

So that the generated commit messages are in same style as previous ones. Therefore increasing the chance of suggested message to fit.

Alternatives

Reject the suggested commit msg and manually commit.

Additional context

No response

@joeytwiddle
Copy link

joeytwiddle commented Aug 17, 2023

I had the exact same idea, and implemented it here:

joeytwiddle@890996f

Feel free to grab that code. Or I can open a pull request if you prefer.

Concerns:

  1. Perhaps it should be an option in the config file, so people can enable or disable it. (It certainly makes the prompt larger.)

@moritztim
Copy link

I think there is one thing to be noted: If previous commits with AI generated messages are factored in, this will distort the style, therefore there would either be a system to separately store which commits are AI generated or just storing a single commit hash after which it can't be assumed that all commits are written by humans.

@moritztim
Copy link

@joeytwiddle I really like your tweaks, you should definitely make a pr!

@joeytwiddle
Copy link

@moritz-t-w Thanks, but my experience is that my tweaks don't work very well!

The AI always chooses to use conventional style (usually with the "refactor" label) even if previous commits used different tags, or didn't use conventional style at all.

@moritztim
Copy link

Well maybe that'll need some work but the other things you've done seem pretty reasonable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request pending triage
Projects
None yet
Development

No branches or pull requests

3 participants