Update version_branch.yml
This commit is contained in:
4
.github/workflows/version_branch.yml
vendored
4
.github/workflows/version_branch.yml
vendored
@@ -464,8 +464,7 @@ jobs:
|
||||
|
||||
stamp = datetime.now(timezone.utc).strftime("%Y-%m-%d")
|
||||
p = Path("CHANGELOG.md")
|
||||
raw = p.read_text(encoding="utf-8", errors="replace")
|
||||
lines = raw.splitlines(True)
|
||||
lines = p.read_text(encoding="utf-8", errors="replace").splitlines(True)
|
||||
|
||||
def is_h2(line: str) -> bool:
|
||||
return line.lstrip().startswith("## ")
|
||||
@@ -532,7 +531,6 @@ jobs:
|
||||
"]
|
||||
lines[insert_at:insert_at] = moved
|
||||
|
||||
# Clear Unreleased body.
|
||||
unreleased_idx = find_idx(lambda ln: norm(ln) == "## [unreleased]")
|
||||
if unreleased_idx is not None:
|
||||
u_start = unreleased_idx + 1
|
||||
|
||||
Reference in New Issue
Block a user