Record do-epic's repo picks and sub-task summaries in the team's own spelling
CI / tests (pull_request) Failing after 2m33s
CI / tests (pull_request) Failing after 2m33s
This commit is contained in:
@@ -168,7 +168,21 @@ class Planning(DoEpicTest):
|
||||
self.issues = [issue("ABC-20")]
|
||||
fake = FakeEffects(claude=[says({"parts": []}), says({"pick": "unclear", "question": "Is the importer in api or in web?"})], inputs=["backend"])
|
||||
found, _, _ = self.plan(fake)
|
||||
self.assertEqual((found, fake.made("input")), ([issue("ABC-20", "repo:api")], ["The label that says where ABC-20 is worked, `repo:<name>`, `do-epic-claude` or `do-epic-human` (or the team's `backend`), or Enter alone to leave it waiting: "]))
|
||||
self.assertEqual((found, fake.made("input")), ([issue("ABC-20", "backend")], ["The label that says where ABC-20 is worked, `repo:<name>`, `do-epic-claude` or `do-epic-human` (or the team's `backend`), or Enter alone to leave it waiting: "]))
|
||||
|
||||
def test_files_sub_tasks_in_the_teams_labels_and_summary_and_names_its_label_for_a_repo_typed_by_name(self) -> None:
|
||||
with (self.home / ".claude-projects/do-epic/config.toml").open("a", encoding="utf-8") as config:
|
||||
config.write('\n[label-repos]\nbackend = "api"\n')
|
||||
text = (self.home / ".claude-projects/do-epic/config.toml").read_text(encoding="utf-8")
|
||||
(self.home / ".claude-projects/do-epic/config.toml").write_text('sub-task-summary = "{label}: {Summary}"\n' + text, encoding="utf-8")
|
||||
self.issues = [issue("ABC-20"), issue("ABC-21")]
|
||||
parts = says({"parts": [{"repo": "api", "change": "Add the endpoint."}, {"repo": "web", "change": "Call it."}], "comment": "Delat per repo."})
|
||||
fake = FakeEffects(claude=[parts, says({"parts": []}), says({"pick": "unclear", "question": "api or web?"})], inputs=["api", "backend"])
|
||||
found, store, _ = self.plan(fake)
|
||||
assert not isinstance(found, Failure | Limited), found
|
||||
self.assertEqual([(each.summary, each.labels) for each in store.issues if each.parent == "ABC-20"], [("backend: Do ABC-20", ("backend",)), ("web: Do ABC-20", ("repo:web",))])
|
||||
self.assertIn("`api` is none of those labels; the repo api's label is `backend`\n", self.asked.getvalue())
|
||||
self.assertEqual(next(each for each in store.issues if each.key == "ABC-21").labels, ("backend",))
|
||||
|
||||
def test_asks_the_human_for_the_label_of_an_issue_the_rule_leaves_unclear_until_one_is_typed(self) -> None:
|
||||
self.issues = [issue("ABC-20")]
|
||||
|
||||
Reference in New Issue
Block a user