Record do-epic's repo picks and sub-task summaries in the team's own spelling #657

Merged
lilleman merged 11 commits from item-449 into main 2026-11-20 11:16:09 +01:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit d004fde8ce - Show all commits
+2 -2
View File
@@ -62,8 +62,8 @@ Pick = Repo | ClaudeWork | HumanTask
def team_label(repo: str, team: LabelRepos) -> str | None:
"""The team's label for the repo: the first by name where the table maps several labels to it, None where it names none."""
return min((label for label, name in team.items() if name == repo), default=None)
"""The label on the table's first line that maps to the repo; None where no line does."""
return next((label for label, name in team.items() if name == repo), None)
def label_of(pick: Pick, team: LabelRepos) -> str:
+2 -2
View File
@@ -164,8 +164,8 @@ class RepoPick(unittest.TestCase):
with self.subTest(pick=pick):
self.assertEqual(label_of(pick, TEAM), label)
def test_the_first_label_by_name_stands_for_a_repo_the_table_names_twice(self) -> None:
self.assertEqual(label_of(Repo("core-4"), {"core": "core-4", "core-4": "core-4"}), "core")
def test_the_first_line_of_the_table_stands_for_a_repo_it_names_twice(self) -> None:
self.assertEqual(label_of(Repo("core-4"), {"zeta": "core-4", "core-4": "core-4"}), "zeta")
def test_a_pick_by_claude_is_labelled_with_the_teams_label_and_no_repo_label(self) -> None:
picked(self.store, self.issue(), TEAM, RULE, RUNG, says({"pick": "repo", "repo": "tenant-web-ui-4"}), "/rules")