Regex for matching git repo names for git.commitPrefixes
#1941
harsilspatel
started this conversation in
Ideas
Replies: 2 comments
-
You could try hacking up a lazygit custom command to do this |
Beta Was this translation helpful? Give feedback.
0 replies
-
I have this same workflow inconvenience as well |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This feature request stems from my git workflow which warrants prefixing the commits, in all the repositories, with relevant Jira issue ID. So, every new repo has to be added to the
git.commitPrefixes
with the samepattern
andreplace
config.A solution that I could think of was matching the project names by regular expressions. And perhaps we could define precedence, say the last entry that matches repo name is used, if multiple regexes match the project name.
For instance, let's say our repo name is
kramerica_industries_api
and if our config involves the following (snippet):then the entry
.*api$
will be used for the commit prefix.My example assumes that the order of the object keys is maintained when the yaml config is parsed. If not we'll have to impose precedence some other way but hopefully the example articulates my thoughts well enough to spark a discussion on the topic!
Beta Was this translation helpful? Give feedback.
All reactions