Start a do-epic chunk's issue in Jira: assigned, moved by a start transition and added to a board's active sprint
This commit is contained in:
+12
-1
@@ -83,7 +83,7 @@ Backend = typing.Callable[[DoEpicConfig, str], tuple[EpicStore, EpicRecord]]
|
||||
|
||||
def jira_backend(config: DoEpicConfig, key: str) -> tuple[EpicStore, EpicRecord]:
|
||||
epic = Epic(config.jira_url, key)
|
||||
return JiraEpic(epic, config.env_file, finish=config.finish, finding_type=config.finding_type, review_type=config.review_type), EpicRecord(EpicDescription(epic, config.env_file))
|
||||
return JiraEpic(epic, config.env_file, finish=config.finish, finding_type=config.finding_type, review_type=config.review_type, start=config.start), EpicRecord(EpicDescription(epic, config.env_file))
|
||||
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
@@ -305,6 +305,8 @@ def chunk_run(key: str, epic: EpicRun) -> Stop:
|
||||
if isinstance(place, Stop):
|
||||
return place
|
||||
root, repo = place
|
||||
if issue:
|
||||
issue_started(key, epic)
|
||||
if unmade := folder_made(root):
|
||||
return Stop(1, unmade.reason)
|
||||
session = session_named(f"A {epic.key} do-epic {key}", epic.paths.claude_code_transcripts)
|
||||
@@ -335,6 +337,15 @@ def chunk_run(key: str, epic: EpicRun) -> Stop:
|
||||
return handed_on(key, epic, repo is not None)
|
||||
|
||||
|
||||
def issue_started(key: str, epic: EpicRun) -> None:
|
||||
"""Starts the issue called key in the tracker, and says who else holds it, or why it didn't start. The chunk runs either way: the tracker shows the team the work, and the work doesn't read it."""
|
||||
other = epic.store.start_issue(key)
|
||||
if isinstance(other, Failure):
|
||||
say(f"{key} doesn't show in the tracker as started, and its chunk runs all the same: {other.reason}", epic.effects, stdout=True)
|
||||
elif other:
|
||||
say(f"{key} stays assigned to {other}, who holds it", epic.effects, stdout=True)
|
||||
|
||||
|
||||
def parked_through(repo: str, loop: Loop, epic: EpicRun, told: str | None, finished: bool) -> str | Stop:
|
||||
"""Keeps the chunk in loop's window parked. Its work is in the repo called repo. It stays parked for as long as its pull request waits on a gate, and returns once its worker has something to do: what to tell that worker, or empty where the chunk was never parked. told is the news its last cycle's worker got, None where the window just started, and finished says the judge ruled the chunk finished. A window that just started parks the chunk only if its file says so: the forge isn't read for a chunk that starts afresh.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user