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
CI / tests (pull_request) Successful in 5m4s
This commit is contained in:
@@ -271,6 +271,24 @@ class LoadTest(ConfigCase):
|
||||
assert isinstance(named, ProjectConfig), named
|
||||
self.assertEqual(named.notifier, name)
|
||||
|
||||
def test_the_epic_branch_and_its_review_request_comment_are_optional(self) -> None:
|
||||
self.write("acme", CLIENT)
|
||||
left_out = load(self.checkout, self.checkout, self.home)
|
||||
assert isinstance(left_out, ProjectConfig), left_out
|
||||
self.assertEqual((left_out.epic_branch, left_out.review_request_comment), (None, None))
|
||||
(self.home / ".claude-projects" / "acme" / "config.toml").write_text(CLIENT + 'epic-branch = "epic/{epic}"\nreview-request-comment = "@coderabbitai review"\n')
|
||||
named = load(self.checkout, self.checkout, self.home)
|
||||
assert isinstance(named, ProjectConfig), named
|
||||
self.assertEqual((named.epic_branch, named.review_request_comment), ("epic/{epic}", "@coderabbitai review"))
|
||||
|
||||
def test_an_epic_branch_without_the_epic_or_a_comment_without_an_epic_branch_fails_naming_it(self) -> None:
|
||||
self.write("acme", CLIENT + 'epic-branch = "develop"\n')
|
||||
self.assertIn("`epic-branch` is 'develop', not text with exactly one {epic}", self.failure())
|
||||
(self.home / ".claude-projects" / "acme" / "config.toml").write_text(CLIENT + 'review-request-comment = "@coderabbitai review"\n')
|
||||
self.assertIn("`review-request-comment` is set, so `epic-branch` must be set", self.failure())
|
||||
(self.home / ".claude-projects" / "acme" / "config.toml").write_text(CLIENT + 'epic-branch = "{epic}"\nreview-request-comment = " "\n')
|
||||
self.assertIn("`review-request-comment` is ' ', not one line of text", self.failure())
|
||||
|
||||
def test_a_jira_plan_may_name_the_transition_and_status_that_finish_an_item(self) -> None:
|
||||
self.write("acme", JIRA_CLIENT)
|
||||
left_out = load(self.checkout, self.checkout, self.home)
|
||||
@@ -545,7 +563,7 @@ class LoadTest(ConfigCase):
|
||||
|
||||
def test_the_failure_for_a_misplaced_env_file_and_a_missing_setting_names_both_and_lists_every_setting(self) -> None:
|
||||
folder = self.write("acme", "".join(line + "\n" for line in CLIENT.splitlines() if not line.startswith("plan")) + 'env-file = "checkout:.env"\n')
|
||||
self.assertEqual(self.failure(), f"{folder / 'config.toml'}: `plan` is missing; `env-file` is 'checkout:.env', not {OUTSIDE}. The settings are {', '.join(SETTINGS)}, and optionally branch, coding-conventions, commit-title, env-file, jira-finding-type, jira-finish-status, jira-finish-transition, jira-score-bar, jira-score-formula, language, merge, notifier, parallel-chunks, pull-request-title, readability-floor, tooling-on-host, touch-predictions and wait-for-approval.")
|
||||
self.assertEqual(self.failure(), f"{folder / 'config.toml'}: `plan` is missing; `env-file` is 'checkout:.env', not {OUTSIDE}. The settings are {', '.join(SETTINGS)}, and optionally branch, coding-conventions, commit-title, env-file, epic-branch, jira-finding-type, jira-finish-status, jira-finish-transition, jira-score-bar, jira-score-formula, language, merge, notifier, parallel-chunks, pull-request-title, readability-floor, review-request-comment, tooling-on-host, touch-predictions and wait-for-approval.")
|
||||
|
||||
def test_two_configs_naming_one_checkout_fail_naming_both(self) -> None:
|
||||
self.write("acme", CLIENT)
|
||||
|
||||
Reference in New Issue
Block a user