Pick each epic item's repo by repo-rule.md and record the pick as a label on the issue
CI / tests (pull_request) Failing after 4m10s

This commit is contained in:
2026-11-18 13:26:50 +01:00
parent f444dca67a
commit 29568fab6c
9 changed files with 377 additions and 9 deletions
+8
View File
@@ -43,6 +43,9 @@ class EpicStore(typing.Protocol):
def file(self, parent: str, summary: str, detail: str, labels: tuple[str, ...]) -> str | Failure:
"""Files an open issue under parent and answers its key: a child issue where parent is the epic, a sub-task where parent is one of its child issues. detail is markdown, and may be empty."""
def add_label(self, key: str, label: str) -> None | Failure:
"""Adds label to the epic's child issue named key, leaving its other labels as they are; adding one it already has changes nothing. A sub-task, or an issue outside the epic, is refused."""
def unfit(summary: str, labels: tuple[str, ...]) -> Failure | None:
"""Why no tracker can file an issue with this summary and these labels; None where one can."""
@@ -56,3 +59,8 @@ def unfit(summary: str, labels: tuple[str, ...]) -> Failure | None:
def no_parent(epic_key: str, parent: str) -> Failure:
"""What every backend says when asked to file under parent, which is neither the epic nor one of its child issues."""
return Failure(f"{parent} is neither the epic {epic_key} nor one of its child issues, so nothing can be filed under it")
def no_child(epic_key: str, key: str) -> Failure:
"""What every backend says when asked to label key, which is not one of the epic's child issues."""
return Failure(f"{key} is not one of the child issues of the epic {epic_key}, so it cannot be labelled")