From d004fde8cef3073ee4cd558f0a6de31368983496 Mon Sep 17 00:00:00 2001 From: Lilleman Date: Fri, 20 Nov 2026 10:46:19 +0100 Subject: [PATCH] =?UTF-8?q?Answer=20product-owner=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=20the=20first?= =?UTF-8?q?=20line=20of=20the=20table=20stands=20for=20a=20repo=20it=20nam?= =?UTF-8?q?es=20twice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/do_epic/repo_pick.py | 4 ++-- bin/do_epic/test_repo_pick.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/do_epic/repo_pick.py b/bin/do_epic/repo_pick.py index aa2036a7..ad2c1ae9 100644 --- a/bin/do_epic/repo_pick.py +++ b/bin/do_epic/repo_pick.py @@ -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: diff --git a/bin/do_epic/test_repo_pick.py b/bin/do_epic/test_repo_pick.py index ea97cf7c..a34beadd 100644 --- a/bin/do_epic/test_repo_pick.py +++ b/bin/do_epic/test_repo_pick.py @@ -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")