diff --git a/bert_e/tests/test_bert_e.py b/bert_e/tests/test_bert_e.py index a399a75d..fb42f93c 100644 --- a/bert_e/tests/test_bert_e.py +++ b/bert_e/tests/test_bert_e.py @@ -277,10 +277,17 @@ def test_feature_branch_names(self): with self.assertRaises(exns.BranchNameInvalid): self.feature_branch('feature/') + with self.assertRaises(exns.BranchNameInvalid): + self.feature_branch('epic') + + with self.assertRaises(exns.BranchNameInvalid): + self.feature_branch('epic/') + # valid names self.feature_branch('feature/TEST-0005') self.feature_branch('improvement/TEST-1234') self.feature_branch('bugfix/TEST-1234') + self.feature_branch('epic/TEST-1234') src = self.feature_branch('project/TEST-0005') self.assertEqual(src.jira_issue_key, 'TEST-0005') diff --git a/bert_e/workflow/gitwaterflow/branches.py b/bert_e/workflow/gitwaterflow/branches.py index fc3e1887..c896c472 100644 --- a/bert_e/workflow/gitwaterflow/branches.py +++ b/bert_e/workflow/gitwaterflow/branches.py @@ -98,7 +98,7 @@ class ReleaseBranch(GWFBranch): class FeatureBranch(GWFBranch): all_prefixes = ('improvement', 'bugfix', 'feature', 'project', - 'documentation', 'design', 'dependabot') + 'documentation', 'design', 'dependabot', 'epic') jira_issue_pattern = '(?P[A-Z0-9_]+)-[0-9]+' prefixes = '(?P(%s))' % '|'.join(all_prefixes) pattern = "^(?P%s/(?P