ivangabriele/vscode-git-automator

Pull value from branch name

Opened this issue · 0 comments

So I'm not sure if this is just a very specific use case but I've seen this at the last two places I've worked, and it has prevented me from using git automator.

In our branching and commit scheme we require you to include a ticket number in both the branch and the commits. I was wondering if it would be possible to add some sort of option that would allow me to create a regex to match something in the branch that I then wanted to use in each commit message. e.g.

Branch name format:
<project-name>-<ticket-number>-<branch-name>
Commit format:
<ticket-number>-<commit-message>

I would want to be able to grab that ticket number from the branch name, and have it auto populated in my commit message when I use git automator. Maybe this is already possible but I didn't see anything that made it look that way.