Order the issues the DM tries by sorting, and pin the window's no-DM line

This commit is contained in:
2026-11-19 03:17:32 +01:00
parent 4fac73c890
commit b63f79ff0b
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -52,9 +52,9 @@ def awaited(task: EpicIssue, epic: str, store: EpicStore, window: tmux.Window, p
elif not told:
text = message(task, epic, held)
say(text, effects, stdout=True)
# The issues it holds up come first; any other open issue of the epic may do where they have no repo with a notifier.
where = notifier_checkout([*(issue for issue in issues if issue.key in held), *(issue for issue in issues if issue.key not in held and not issue.done)], home)
# The issues it holds up come first; any other issue of the epic may do where they have no repo with a notifier.
where = notifier_checkout(sorted(issues, key=lambda issue: issue.key not in held), home)
if where is None:
say("no DM went out: no open issue of the epic has a repo whose project config names a notifier and whose checkout exists", effects, stdout=True)
say("no DM went out: no issue of the epic has a repo whose project config names a notifier and whose checkout exists", effects, stdout=True)
told = where is None or tell(text, effects, where)
effects.sleep(poll)
+1 -1
View File
@@ -89,7 +89,7 @@ class AHumanTaskThatBlocksAnIssue(DoEpicTest):
fake = FakeEffects(git=UNREAD, windows=WINDOW)
code, out, err = self.awaited(fake, closes_after=1)
self.assertEqual((code, err, fake.dms), (0, "", []))
self.assertEqual(out.count("no DM went out"), 1, out)
self.assertEqual(out.count("<1790000000> no DM went out"), 1, out)
def test_the_window_of_a_closed_task_goes_on_while_another_human_task_still_holds_an_issue_up(self) -> None:
self.epic.issues.extend([issue("ABC-30", "do-epic-human"), issue("ABC-31", "do-epic-claude", blockers=("ABC-30",))])