Skip to content

Commit

Permalink
[BERTE-557] Track new pattern for epic branchs
Browse files Browse the repository at this point in the history
  • Loading branch information
erwan-b committed Nov 5, 2021
1 parent 405295c commit c1c1bcf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions bert_e/tests/test_bert_e.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion bert_e/workflow/gitwaterflow/branches.py
Original file line number Diff line number Diff line change
Expand Up @@ -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<jira_project>[A-Z0-9_]+)-[0-9]+'
prefixes = '(?P<prefix>(%s))' % '|'.join(all_prefixes)
pattern = "^(?P<feature_branch>%s/(?P<label>(?P<jira_issue_key>%s)?" \
Expand Down
1 change: 1 addition & 0 deletions settings.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ prefixes:
Story: feature
Bug: bugfix
Improvement: improvement
Epic: epic


# bypass_prefixes [OPTIONAL]
Expand Down

0 comments on commit c1c1bcf

Please sign in to comment.