Skip to content

Commit aae5650

Browse files
author
Stephen Kinger
committed
use the pattern only for feature or bugfix branches
1 parent aaf76b1 commit aae5650

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pre_commit_hooks/jira_id_hook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def main():
1919
branch_name = get_current_branch_name()
2020

2121
# Check for a pattern matching 'something_' after a '/'
22-
if re.search(r'\/.+-', branch_name):
22+
if re.search(r'\/.+-', branch_name) and ('feature' in branch_name or 'bugfix' in branch_name):
2323
# Extract the prefix from the branch name (everything after the first '/' and before the first '_')
2424
match = re.search(r'.*\/([A-Z]+-\d+).*', branch_name)
2525
if match:

0 commit comments

Comments
 (0)