vscode-copilot-release icon indicating copy to clipboard operation
vscode-copilot-release copied to clipboard

Generated commit message style

Open MattJeanes opened this issue 1 year ago • 42 comments

I love the new auto generated commit message feature in the VSCode 1.84 release that's just come out.

What I would love to see to make it even better is the ability to customize the style of commit message, for example conventional commits: ci: added yaml build definition or feat: added test controller etc.

Some of our projects at work require conventional commits for example, and given that the underlying tech is just based on prompts I can imagine this being pretty easy to add with a prompt tweak.

It would be even more amazing if you could give it any style by having the option for a custom pre-prompt e.g. "Use conventional commit styling" or "Use relevant emojis at the start of the message".

A suggestion by @digitarald also is that VSCode could be aware of previous commit messages and copy their style too which I think is also a great idea.

Thank you!

MattJeanes avatar Nov 02 '23 00:11 MattJeanes

adding for reference. https://www.conventionalcommits.org/en/v1.0.0/

kaminskypavel avatar Nov 06 '23 12:11 kaminskypavel

This would be fantastic. The GitLens plugin has a VSCode setting to modify the prompt it uses to send to OpenAI, so I assume this would be quite simple to change for the prompt to CoPilot as well :)

johan-lejdung avatar Nov 07 '23 20:11 johan-lejdung

Any setting/hack for customize the copilet/gpt prompt before sent?

alimd avatar Nov 10 '23 17:11 alimd

I have the same need to use conventional commits

dasaqui avatar Nov 15 '23 20:11 dasaqui

Same here :)

edouardmisset avatar Nov 24 '23 08:11 edouardmisset

same here 🤞

AhmedY0unes avatar Nov 30 '23 11:11 AhmedY0unes

same here 🫰

DADEV2020 avatar Dec 02 '23 11:12 DADEV2020

same here 👈

rafaelmfonseca avatar Dec 02 '23 15:12 rafaelmfonseca

same here

netdjw avatar Dec 06 '23 07:12 netdjw

same here

Khalshim avatar Dec 06 '23 09:12 Khalshim

Please stop posting same here, we get it, VSCode team gets it, the world gets it and it triggers useless notifications for all

superlevure avatar Dec 06 '23 09:12 superlevure

Please stop posting same here, we get it, VSCode team gets it, the world gets it and it triggers useless notifications for all

Sorry :) next time if you posting any answer "we get it", then you can keep calm folks of the Internet

netdjw avatar Dec 06 '23 15:12 netdjw

@superlevure just said something everyone subscribed to this thread wanna said. I am surprised that some still don't know the community rules even they are on Github for such a long time. Maybe it should be a feature request for Github that repo can set a rule to block message like same here, +1 etc.

Just created a feature request. https://github.com/orgs/community/discussions/78033

Sam-Lin-MillersLab avatar Dec 06 '23 15:12 Sam-Lin-MillersLab

We use https://cbea.ms/git-commit/

phily245 avatar Jan 25 '24 11:01 phily245

We use https://cbea.ms/git-commit/

This follows recommendations by git itself: https://www.git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project#_commit_guidelines

phily245 avatar Jan 25 '24 11:01 phily245

We use https://cbea.ms/git-commit/

This follows recommendations by git itself: https://www.git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project#_commit_guidelines

What we are requesting is the possibility to follow conventional commits.

While the recommendations by git provide a valuable basis, conventional commits further increase the readability of commit messages.

Many teams use it because of its integration with semver to automatically generate version numbers via the commit types.

It is common practice to use conventional commits, thus it would be great if the copilot auto commits would also support it.

michvllni avatar Jan 25 '24 12:01 michvllni

Adding a git commit prompt setting would give the flexibility to define the style of the commit message. This would allow users to choose their preference for the commit message format

benjefferies avatar Jan 25 '24 12:01 benjefferies

What we are requesting is the possibility to follow conventional commits.

Not to nitpick, but while the majority of us do want conventional commit support, the issue as written is not specifically for conventional commits and only conventional commits. It's merely used as an example for a broader request to customize the prompt to support whatever style the developer prefers.

If @phily245 also wants to be able to support some other spec too that's fine.

lwestfall avatar Jan 25 '24 12:01 lwestfall

What we are requesting is the possibility to follow conventional commits.

Not to nitpick, but while the majority of us do want conventional commit support, the issue as written is not specifically for conventional commits and only conventional commits. It's merely used as an example for a broader request to customize the prompt to support whatever style the developer prefers.

If @phily245 also wants to be able to support some other spec too that's fine.

Yes, sorry you are correct. It has been quite some time since I had this issue open last and I forgot it's not only about conventional commits

michvllni avatar Jan 25 '24 13:01 michvllni

Adding my voice here as well, given that this issue has been outstanding for some time. I believe implementing this feature would significantly enhance the efficiency of numerous development teams, allowing us to allocate our time more effectively.

jcbowyer avatar Mar 30 '24 12:03 jcbowyer

The March update of VSCode includes improvements to this:

https://code.visualstudio.com/updates/v1_88#_commit-message-generation-improvements

To improve the quality of the generated commit messages, we are now also including the commit messages of the 10 most recent commits in the repository, and the commit messages of the 10 most recent commits of the current user as extra context.

This is fantastic and will have to see how well this works. A custom prompt would still be useful but this will likely solve the issue in most use cases.

MattJeanes avatar Apr 08 '24 15:04 MattJeanes

The March update of VSCode includes improvements to this:

https://code.visualstudio.com/updates/v1_88#_commit-message-generation-improvements

To improve the quality of the generated commit messages, we are now also including the commit messages of the 10 most recent commits in the repository, and the commit messages of the 10 most recent commits of the current user as extra context.

This is fantastic and will have to see how well this works. A custom prompt would still be useful but this will likely solve the issue in most use cases.

this is such a clever idea! i haven't tested it very thoroughly, but on the surface it seems to work! kudos! 🤗

kaminskypavel avatar Apr 08 '24 22:04 kaminskypavel

The update represents an improvement without a doubt, but it would be incredible to be able to determine a custom pattern as context... for example, my company has strict rules like writing the commit in lowercase, including the ticket number, or not exceeding 100 characters. The message generation is perfect, but I need to fix a lot before I can commit.

misaelmoreno avatar Apr 12 '24 09:04 misaelmoreno

Gitbutler have a similar features that follow conventionalcommits. I think this would a very good improvement to vscode

julien-blanchon avatar Apr 23 '24 12:04 julien-blanchon

This is really needed! A custom message style would match each team's own way of writing commits

Jossec101 avatar May 07 '24 15:05 Jossec101

I don't know how, but GitHub Copilot is giving me conventional-commits-style messages today.

VSCode version: 1.89.1 GitHub Copilot extension version: v1.190.0

movahhedi avatar May 12 '24 06:05 movahhedi

@movahhedi it just checks last 10 commit messages and tries to mimic.

lexfrei avatar May 12 '24 09:05 lexfrei

So, for someone who wants to disable this? It now puts 'chore' in front of every message it generates :(.

jorismak avatar May 22 '24 14:05 jorismak

I'm getting the same thing. Doesn't seem to be looking at previous commits. It just uses conventional-commits-style.

1forh avatar May 24 '24 13:05 1forh

The March update of VSCode includes improvements to this: https://code.visualstudio.com/updates/v1_88#_commit-message-generation-improvements

To improve the quality of the generated commit messages, we are now also including the commit messages of the 10 most recent commits in the repository, and the commit messages of the 10 most recent commits of the current user as extra context.

This is fantastic and will have to see how well this works. A custom prompt would still be useful but this will likely solve the issue in most use cases.

this is such a clever idea! i haven't tested it very thoroughly, but on the surface it seems to work! kudos! 🤗

image Oh, fantastic. The latest feature just reads the last 10 commits and spits out the same sentences. Why not just commit the entire alphabet and have it increment by letter? Sorry, this is genius 🙄

musuyaba avatar May 31 '24 08:05 musuyaba