Let a project's config name a working branch per epic that chunks branch off and merge into
CI / tests (pull_request) Successful in 5m4s

This commit is contained in:
Lilleman
2026-11-20 19:32:59 +01:00
parent 9531e5c337
commit 72a4d346d7
33 changed files with 991 additions and 56 deletions
+12 -1
View File
@@ -1,6 +1,6 @@
import unittest
from project_config.templates import BARE, branch_fault, branch_fits, branch_of, fits, summary_of, title_fault, Titles
from project_config.templates import BARE, branch_fault, branch_fits, branch_of, epic_branch, epic_branch_fault, fits, summary_of, title_fault, Titles
class TitleTest(unittest.TestCase):
@@ -31,6 +31,17 @@ class TitleTest(unittest.TestCase):
with self.subTest(template):
self.assertIsNotNone(branch_fault(template))
def test_an_epic_branch_template_holds_one_epic_and_names_a_branch_git_accepts(self) -> None:
for template in ("{epic}", "epic/{epic}"):
with self.subTest(template):
self.assertIsNone(epic_branch_fault(template))
for template in ("develop", "{epic}/{epic}", "{id}", "epic {epic}", "-{epic}", "{epic}.lock", 3):
with self.subTest(template):
self.assertIsNotNone(epic_branch_fault(template))
def test_fills_an_epic_branch_with_the_epics_key(self) -> None:
self.assertEqual(epic_branch("epic/{epic}", "ABC-123"), "epic/ABC-123")
def test_fills_a_branch_with_the_items_id(self) -> None:
self.assertEqual(branch_of("item-{id}", 357), "item-357")
self.assertEqual(branch_of("feature/PAY-{id}", 357), "feature/PAY-357")