Answer prose round 1: 0 🔴, 7 🟡 (0 misread); reword the start's settings, docstrings and messages
CI / tests (pull_request) Successful in 3m44s
CI / tests (pull_request) Successful in 3m44s
This commit is contained in:
@@ -158,7 +158,7 @@ The last line prints each setting's path once the config is complete.
|
||||
- `config.toml` fits do-epic to a team whose own automation moves issues, such as a CI job that moves an issue when its pull request merges. Two settings do:
|
||||
- `jira-unblocking-statuses` lists the statuses at which an issue's work has landed though Jira doesn't count it done yet, such as `["Release Ready"]`, in upper or lower case. An issue in one of them takes no chunk and no longer blocks the issues it blocks, and `--status` names the statuses beside each blocker. A status Jira counts as done always does both. The release reviews, which are the epic's last chunk, still wait until Jira counts every issue done: run `do-epic <EPIC-KEY>` then, to start them.
|
||||
- `jira-automation-moves-issues = true` keeps do-epic from moving the issue of a finished chunk in a repo: the automation moves it, and do-epic waits for that move before it starts what the issue blocks. An issue without a repo has no pull request, so do-epic still moves it, with `jira-finish-transition`. The setting needs `jira-unblocking-statuses`, which names the status the automation gives an issue whose pull request merged.
|
||||
- `config.toml` shows a team's board that a chunk has started. A starting chunk always assigns its issue to the account do-epic works as, unless someone else holds it. `jira-start-transition` names the workflow transition that then moves the issue, such as `"In Progress"`; an issue whose work has started already keeps its status. `jira-sprint-board` is the ID of the board whose active sprint the issue joins, such as `6`. Without a setting, do-epic doesn't make that move.
|
||||
- `config.toml` also says how a starting chunk's issue shows on its team's board. A starting chunk always assigns its issue to the account do-epic works as, unless someone else holds it; that issue keeps its assignee, and moves and joins the sprint like any other. `jira-start-transition` names the workflow transition that then moves the issue, such as `"In Progress"`; an issue whose work has started already keeps its status. `jira-sprint-board` is the ID of the board whose active sprint the issue joins, such as `6`. Where a setting is left out, do-epic doesn't take its step.
|
||||
- `config.toml` may set `jira-finding-type`, the issue type do-epic files a finding as, and `jira-review-type`, the one it files a repo's release review as, such as `"Feature"` and `"Chore"`. Both are Task where left out. do-epic doesn't file anything where the Jira project lacks the type, and says which types it has.
|
||||
- `config.toml` may set `sub-task-summary`, which shapes the summary of each sub-task do-epic files for an issue that changes several repos, such as `sub-task-summary = "{label}: {Summary}"`. `{label}` is the team's label for the repo, else the repo's name, and `{Summary}` is the issue's summary with a capital first letter. It must hold `{Summary}`. Without it a summary is `[<repo>] <the issue's summary>`.
|
||||
- `config.toml` may end with a `[label-repos]` table, for a team that already labels its issues by repo. Give it one line for each such label: the label, then the repo's name, such as `twu-4 = "tenant-web-ui-4"`. do-epic reads such a label as it reads its own `repo:<name>`. Where the label is the repo's name, map the name to itself, as in `core-4 = "core-4"`. Where several lines name one repo, do-epic writes the label of the first. Write every other setting above the table.
|
||||
|
||||
@@ -77,7 +77,7 @@ def offer_of(raw: object) -> tuple[str, str, str, str] | None:
|
||||
|
||||
|
||||
def offers_of(offered: object, key: str) -> list[tuple[str, str, str, str]] | Failure:
|
||||
"""Each transition in Jira's answer about those the issue named key has from its present status, as offer_of answers one."""
|
||||
"""The transitions Jira offers the issue named key from its present status, each as offer_of answers one. A Failure where offered, Jira's answer, is in another shape."""
|
||||
raw = offered.get("transitions") if isinstance(offered, dict) else None
|
||||
found = [offer for each in raw if (offer := offer_of(each))] if isinstance(raw, list) else []
|
||||
if not isinstance(raw, list) or len(found) != len(raw):
|
||||
|
||||
@@ -225,7 +225,7 @@ class JiraEpic:
|
||||
return Failure(f"{refused}; {PERHAPS_MOVED.format(key=key)}") if refused else None
|
||||
|
||||
def within(self, key: str, authorization: str, do: str, done_to_it: str) -> tuple[str, bool] | Failure:
|
||||
"""The key of the parent of key, which is a child issue of the epic or a sub-task of one, and whether key's status is a done one; any other key is refused. do and done_to_it say what was asked of key, such as "finish" and "finished"."""
|
||||
"""The key of key's parent and whether key's status is a done one, where key names a child issue of the epic or a sub-task of one; any other key is refused. do and done_to_it say what was asked of key, such as "finish" and "finished"."""
|
||||
placed = self.placed(key, authorization, f"to {do} it")
|
||||
if isinstance(placed, Failure):
|
||||
return placed
|
||||
|
||||
@@ -68,7 +68,7 @@ class EpicStore(typing.Protocol):
|
||||
"""Posts comment, markdown, on the epic's child issue named key, or on a sub-task of one, then sets its scores. The comment tells the team the scores, since a tracker's screens may not show them. scores holds each of L, E, I and S, and moves is the plan's Moves cell, which may be empty. An issue that holds a score keeps what it holds and is refused, as are an issue outside the epic and a blank comment. Where the scores cannot be set after the comment is posted, the Failure says so."""
|
||||
|
||||
def start_issue(self, key: str) -> str | None | Failure:
|
||||
"""Shows the team that the epic's child issue named key, or a sub-task of one, is being worked. It assigns an issue nobody holds to the account the store works as. An issue someone else holds stays theirs, and the answer is their display name; otherwise the answer is None. Where the backend's settings say so, it also moves an issue whose work hasn't started and adds it to a sprint. An issue outside the epic is refused. A Failure names the first step that could not be made; each other step stands where the tracker took it."""
|
||||
"""Shows the team that the epic's child issue named key, or a sub-task of one, is being worked. It assigns an issue nobody holds to the account the store works as. An issue someone else holds stays theirs, and the answer is their display name; otherwise the answer is None. Where the backend's settings say so, it also moves an issue whose work hasn't started, and adds every starting issue to a sprint, whoever holds it. An issue outside the epic is refused. A Failure names each step that could not be made, and anyone else who holds the issue; the steps the tracker took stay taken."""
|
||||
|
||||
def finish_issue(self, key: str) -> None | Failure:
|
||||
"""Moves the epic's child issue named key, or a sub-task of one, to a done status, so that read answers it as done; one already done stays as it is. An issue outside the epic is refused. A Failure says why the move could not be made: the issue's workflow gives no way to a done status, gives several the backend cannot choose between, or refuses the move."""
|
||||
|
||||
@@ -18,7 +18,7 @@ One pair per machine, the same for every epic (docs/decisions.md → `do-epic: d
|
||||
- `language` is the default language of Jira text, by its English name. English where left out.
|
||||
- `jira-finish-transition` and `jira-finish-status` name the workflow transition that moves a finished chunk's issue and closes a finished epic, such as "Mark as done", and the status it leads to, such as "Done". A project's config names a plan item's the same way. Set both or neither; without them do-epic moves no issue to done and closes no epic.
|
||||
- `jira-start-transition` names the workflow transition that moves an issue as its chunk starts, such as "In Progress". An issue whose work has started already, such as one in Code Review, keeps its status. Without it do-epic doesn't move a starting issue.
|
||||
- `jira-sprint-board` is the ID of a Jira board, the number in the board's address, such as `6`. An issue whose chunk starts joins that board's active sprint; a sub-task's parent joins in its place. Without it do-epic adds no issue to a sprint.
|
||||
- `jira-sprint-board` is the ID of a Jira board, the number in the board's address, such as `6`. An issue whose chunk starts joins that board's active sprint; a sub-task's parent joins in its place. Without it do-epic doesn't add a starting issue to a sprint.
|
||||
- `jira-unblocking-statuses` lists the statuses at which an issue's work has landed though Jira doesn't count it done yet, such as `["Release Ready"]`, in upper or lower case. An issue in one of them takes no chunk and no longer blocks the issues it blocks. A status Jira counts as done always does both, listed or not.
|
||||
- `jira-automation-moves-issues = true` says the team's own automation moves an issue when its pull request merges. do-epic then moves only the issue of a chunk without a repo, which has no pull request, and waits for the automation to move each other. It needs `jira-unblocking-statuses`, which then names the status the automation gives an issue whose pull request merged. false where left out.
|
||||
- `jira-finding-type` names the Jira issue type do-epic files a finding as, and `jira-review-type` the one it files a repo's release review as, such as `"Feature"` and `"Chore"`, for a Jira project that has no Task type. Task where left out. do-epic doesn't file anything where the project lacks the type, and says which types it has.
|
||||
@@ -78,7 +78,6 @@ class DoEpicConfig:
|
||||
sub_task_summary: str | None = None
|
||||
finding_type: str = DEFAULT_ISSUE_TYPE
|
||||
review_type: str = DEFAULT_ISSUE_TYPE
|
||||
# What a starting chunk's issue gets beside its assignee.
|
||||
start: Start = Start()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user