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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user