aicommits icon indicating copy to clipboard operation
aicommits copied to clipboard

Allow for custom prefix for the commit message

Open aslakhol opened this issue 2 years ago • 6 comments

It would be great to have a flag -p or --prefix that would take an argument that would be prefixed into the final commit message.

aicommits -p web: would yield this commit message web: <commit message generated by aicommits>

Why? For monorepos it can be useful to prefix commits the name of the project you are working on. It would also allow us to make it possible to use semantic commits before we get that generated by GPT, while being more versatile.

aslakhol avatar Feb 23 '23 13:02 aslakhol

I'd also welcome this feature but for adding JIRA ticket references 😄

ghost avatar Mar 16 '23 11:03 ghost

I'd also welcome this feature but for adding JIRA ticket references 😄

That's exactly why I came here, without this feature I can't use this tool as such, I would only have to copy the text and do the commit myself manually.

mreduar avatar Apr 30 '23 15:04 mreduar

I'd also welcome this feature but for adding JIRA ticket references 😄

That's exactly why I came here, without this feature I can't use this tool as such, I would only have to copy the text and do the commit myself manually.

The workaround I'm doing is that I add the Jira ticket prefix manually. In my case, the installed hook opens nano for commit message editing and I can add the jira ticket there.

ghost avatar May 23 '23 08:05 ghost

The workaround I'm doing is that I add the Jira ticket prefix manually. In my case, the installed hook opens nano for commit message editing and I can add the jira ticket there.

There is a PR #113 that could solve the problem for many. But there doesn't seem to be much activity from the maintainers.

mreduar avatar May 23 '23 13:05 mreduar

Meanwhile this is getting implemented. You can create a git hook that reads the ticket number of a jira ticket from the branch and prefixes every commit message. https://betterprogramming.pub/how-to-automatically-add-the-ticket-number-in-git-commit-message-bda5426ded05

DanielWeidensdoerfer avatar Aug 04 '23 14:08 DanielWeidensdoerfer