auto-commit-msg icon indicating copy to clipboard operation
auto-commit-msg copied to clipboard

Suggestion: Allow you to define prefix

Open glassesUSA opened this issue 4 years ago • 4 comments

Can there be a way to define a custom prefix before each message? For example

ThisIsARequest - update 4 files delete 1 file

glassesUSA avatar Aug 30 '21 14:08 glassesUSA

Thanks, good idea!

I'm after this myself.

I've being using git commit message template, but it doesn't give full functionality i need.

MichaelCurrin avatar Aug 30 '21 16:08 MichaelCurrin

Do you think the extension should create from configured commit.template value? And read ThisIsARequest from _COMMIT_MSG or whatever txt file on disc.

Then it is a natural flow.

I like _COMMIT_MSG as a file in the repo and then ignore the file globally and put my content in there. It fills the commit msg whether using the CLI or the Git pane, so works without my extension.

The tricky bit is that the template message should appear at the start of end of the final generated message.

MichaelCurrin avatar Aug 30 '21 18:08 MichaelCurrin

A hack for the short term, based on current implementation of the extension

So far if you do this with a colon

ThisIsARequest docs:

and run the extension, you'll get your file changes listed. But docs won't change.

so it will be generated as

ThisIsARequest docs: update 4 files delete 1 file

While

ThisIsARequest

will result in unfortunately.

feat: update 4 files delete 1 file ThisIsARequest 

MichaelCurrin avatar Aug 30 '21 18:08 MichaelCurrin

I have work in progress in #64. I'll update here when I get further with it.

MichaelCurrin avatar Sep 22 '21 09:09 MichaelCurrin