Merge remote-tracking branch 'origin/main' into item-409
CI / tests (pull_request) Successful in 5m26s
CI / tests (pull_request) Successful in 5m26s
This commit is contained in:
@@ -5,6 +5,7 @@ import dataclasses
|
||||
import re
|
||||
import typing
|
||||
|
||||
from plan.todo_table import Exempt, Moves
|
||||
from failure import Failure
|
||||
|
||||
# What a tracker accepts as a label: Jira refuses a label holding white space.
|
||||
@@ -28,6 +29,16 @@ class EpicIssue:
|
||||
done: bool
|
||||
# The epic's key for a child issue, the child's key for a sub-task.
|
||||
parent: str
|
||||
# The score of each column the issue has one for, such as {"L": 2}, as `plan_store` reads them from the issue's `plan-item` property. Empty where the issue has no scores.
|
||||
scores: dict[str, int] = dataclasses.field(default_factory=dict)
|
||||
# The goals the issue moves, and how far (the plan's Moves cell); empty where it names none.
|
||||
moves: Moves = ()
|
||||
# Why the issue is exempt from the plan's score bar, as the plan's Exempt cell names it; empty where it isn't.
|
||||
exempt: Exempt = ""
|
||||
# The key of each issue that blocks this one, in the tracker's order.
|
||||
blockers: tuple[str, ...] = ()
|
||||
# True where the loop filed the issue through EpicStore.file; False for an issue a person filed.
|
||||
by_loop: bool = False
|
||||
|
||||
|
||||
class EpicStore(typing.Protocol):
|
||||
@@ -41,7 +52,7 @@ class EpicStore(typing.Protocol):
|
||||
"""Each child issue, open or done, in the tracker's rank order, each followed by its sub-tasks in theirs."""
|
||||
|
||||
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."""
|
||||
"""Files an open issue under parent, marked as filed by the loop, 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 leaves the labels as they are. A sub-task, or an issue outside the epic, is refused."""
|
||||
|
||||
Reference in New Issue
Block a user