DEV Community

loading...
Cover image for Task id to commit message

Task id to commit message

gf_developer profile image GF ・1 min read

I'm sure many of us include task id to branch name, like feature/PROJECT-123. And I'm sure many of us should include task id to commit message, like PROJECT-123 made cool stuff as well. The necessity to add task id to every commit message by hands irritates me, so I decided to write a little git hook intended to do it automatically. I made npm package with this hook and have just published it a couple of days ago.

This hook should be called only at commit-msg git hook because there we have a path to the entered commit message, however, you can find it in readme :)

I hope this hook will help to save a little bit of time!

Discussion (2)

pic
Editor guide
Collapse
mateuszjarzyna profile image
Mateusz Jarzyna

GitLab is doing this in a pretty good way. When you are merging a merge request, GitLab creates squashed merge commit with message that contains id and merge request and issue name

Collapse
gf_developer profile image
GF Author

Sounds good! But I’ve never worked with GitLab. And this package is sooner for trivial commits, not about merge