Answer stability round 2: 0 🔴, 1 🟡 (0 misread); count an untagged branch as cut below 0.0.0 and test it
This commit is contained in:
+3
-3
@@ -7,8 +7,8 @@ from failure import Failure
|
||||
from todo_table import Item, items, next_item, release_of, renames
|
||||
from markdown_text import sections
|
||||
|
||||
# The version a branch with no v* tag counts as cut, so that every release todo.md names comes after it.
|
||||
BEFORE_FIRST_RELEASE = (0, 0, 0)
|
||||
# The version a branch with no v* tag counts as cut: below every release, 0.0.0 included, so that every release todo.md names comes after it.
|
||||
BEFORE_FIRST_RELEASE = (-1, 0, 0)
|
||||
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
@@ -137,7 +137,7 @@ def next_release(found: list[Item], cut: LastCut) -> Upcoming | Cut | Unknown:
|
||||
cut_version = BEFORE_FIRST_RELEASE if untagged else version_of(cut.tag)
|
||||
if cut_version is None:
|
||||
return Upcoming(earliest, True, landed(cut))
|
||||
if earliest is not None and earliest <= cut_version and not untagged:
|
||||
if earliest is not None and earliest <= cut_version:
|
||||
return Cut(earliest)
|
||||
named = named_releases(cut.todos_since)
|
||||
if isinstance(named, Failure):
|
||||
|
||||
Reference in New Issue
Block a user