Answer product-owner round 1: 1 🔴, 1 🟡 (1 misread); DM through the checkout of a held-up issue's repo and show the DM in the window

This commit is contained in:
2026-11-19 02:44:22 +01:00
parent 1c6f229cd9
commit d652ab20d3
4 changed files with 20 additions and 9 deletions
+4 -3
View File
@@ -1,7 +1,8 @@
from loop_effects.effects import Effects, say
def tell(text: str, effects: Effects) -> None:
"""DMs text to the human. Where the DM fails, it says why on stderr and goes on: the DM only copies what the terminal shows, so its failure never stops the loop."""
if failed := effects.dm(text):
def tell(text: str, effects: Effects, directory: str | None = None) -> bool:
"""DMs text to the human through the notifier of the project whose checkout holds directory, else the current directory, and returns whether it went out. Where the DM fails, it says why on stderr and goes on: the DM only copies what the terminal shows, so its failure never stops the loop."""
if failed := effects.dm(text, directory):
say(f"could not DM you: {failed.reason}", effects)
return not failed