opencommit icon indicating copy to clipboard operation
opencommit copied to clipboard

[Feature]: Summarise git commit message

Open gamoreli opened this issue 2 years ago • 6 comments
trafficstars

Description

opencommit feature tends to generate quite a chunk of text for commit messages when descriptions are set. Detailed? Yes. But a bit long to read? Probably.

What if we add a feature that lets us summarise these commit messages after the initial commit?

Suggested Solution

  • After making a commit, the system would check if the commit message is getting lengthy.
  • If it is, it could then pop a question, asking if you'd like to summarise the commit message.
  • If you say yes it generates a neat, concise summary of your commit message, keeping the important stuff and skipping the fluff.

Alternatives

No response

Additional Context

No response

gamoreli avatar May 30 '23 11:05 gamoreli

I would love to see this too. I love the detail that it includes but I'd also like to see the first line just be a short summary of changes (ideally <= 50 characters)

slacksystem avatar Jun 15 '23 22:06 slacksystem

I presume this is due to changing the default value of the OCO_OPENAI_MAX_TOKENS=<max response tokens from openAI API>

In newer version it defaults to 500 while in olders it used to be 196

The 196 default was used until v2.0.16 looking at history.

As I workaround I just set OCO_OPENAI_MAX_TOKENS=196 in ~/.opencommit to make commit messages much shorter for now.

wojukasz avatar Jun 30 '23 11:06 wojukasz

I don't mind the length it can be helpful to be detailed, it's just that I would like a short summary in the title, gives an overall sense of what was changed in the commit so that you can see it for example on editors that show the most recent update to a line in-line, etc

slacksystem avatar Jun 30 '23 22:06 slacksystem

Stale issue message

github-actions[bot] avatar Aug 10 '23 21:08 github-actions[bot]

subjectOpenCommit

I just tried to modified in my local and seems it has short sumary on the first line

image

aldinokemal avatar Aug 05 '24 04:08 aldinokemal

+1

f-liva avatar Aug 29 '24 15:08 f-liva