Answer stability round 2: 0 🔴, 1 🟡; test the refusal on a ref that doesn't exist instead of a mock, and say why only Next names a release to empty
This commit is contained in:
@@ -30,11 +30,11 @@ def work_landed(release: tuple[int, int, int], shipped: list[Item], landed: tupl
|
||||
|
||||
|
||||
def landed_towards(found: list[Item], cut: LastCut) -> tuple[int, int, int] | None | Failure:
|
||||
"""The release unreleased changes on the default branch have landed towards: the next release, as chunk-preflight names it (`chunk_pick.chunk_item`), where `chunk_pick.unreleased_changes` counts one or more. None where there is no such release or no such change; a Failure where either cannot be read. found is the default branch's plan."""
|
||||
"""The release unreleased changes on the default branch have landed towards: the next release, as chunk-preflight names it (`chunk_pick.chunk_item`), where it holds items and `chunk_pick.unreleased_changes` counts one or more. None otherwise; a Failure where either cannot be read. found is the default branch's plan."""
|
||||
pick = chunk_item(found, cut)
|
||||
if isinstance(pick, Unknown):
|
||||
return Failure("could not tell the next release from the default branch's tags and todo.md history")
|
||||
# Next is the one pick with a release that holds items; Cut, Finished and Unplanned have none to empty.
|
||||
# Only Next names a release a chunk can empty after work landed: Cut's is already cut, and Finished's and Unplanned's hold no item.
|
||||
if not isinstance(pick, Next):
|
||||
return None
|
||||
changes = unreleased_changes(cut)
|
||||
|
||||
Reference in New Issue
Block a user