Count a cut release's open items as the next release's
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
"""The pure choices the preflight's steps act on."""
|
||||
import pathlib
|
||||
|
||||
from release_plan.release_standing import chunk_item, Cut, dated_cut, LastCut, ReadyToCut, ReviewDue, Unknown, Unplanned
|
||||
from release_plan.release_standing import carried, chunk_item, Cut, dated_cut, LastCut, ReadyToCut, ReviewDue, Unknown, Unplanned
|
||||
from failure import Failure
|
||||
from chunk_preflight.gathered import Forge, NoItem, Plan
|
||||
from chunk_preflight.gathered import CarriedOver, Forge, NoItem, Plan
|
||||
from release_plan.todo_table import NoItemsTable
|
||||
from plan_store import stores as plan_stores
|
||||
from release_plan.release import version
|
||||
@@ -52,7 +52,10 @@ def planned(todo: plan_stores.Plan | Failure, cut: LastCut, default: str, branch
|
||||
first = pick.item
|
||||
if first is None:
|
||||
return NoItem(f"every item of release {version(pick.release)} in {where} waits." if pick.release is not None else f"{where}'s items table holds no item.")
|
||||
return Plan(found, first, f"{first.tagline}\n\n{first.detail}".strip(), branch)
|
||||
moved = [(was, now) for was, now in zip(found, carried(found, cut)) if was.release != now.release]
|
||||
# Every carried item takes one release, the next; the newest release they were filed under names the cut.
|
||||
over = CarriedOver(max(was.release for was, _ in moved), moved[0][1].release, tuple(was.id for was, _ in moved)) if moved else None
|
||||
return Plan(carried(found, cut), first, f"{first.tagline}\n\n{first.detail}".strip(), branch, over)
|
||||
|
||||
|
||||
def worktree_on(porcelain: str, branch: str) -> pathlib.Path | None:
|
||||
|
||||
Reference in New Issue
Block a user