Skip to content

Commit 0d386bd

Browse files
committed
feedback: move decode
1 parent bebee90 commit 0d386bd

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/scripts/check_rendered_specs.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
# Tightly coupled to the format emitted by azldev's render pipeline; if azldev
3636
# ever changes the emitted form (email suffix, version tag, different
3737
# whitespace) this regex must be updated or every spec will look like drift.
38-
# Owner: azure-linux-dev-tools (cmd that emits "* <date> azldev <>" lines).
39-
# e.g. "* Wed Apr 08 2026 azldev <> - 1.0-1"
38+
# Owner: azure-linux-dev-tools (cmd that emits "* <date> azldev <user@example.com>" lines).
39+
# e.g. "* Wed Apr 08 2026 azldev <azurelinux@microsoft.com> - 1.0-1"
4040
_CHANGELOG_DATE_RE = re.compile(
4141
r"^\* [A-Z][a-z]{2} [A-Z][a-z]{2} [0-9]{2} [0-9]{4} azldev\b"
4242
)
@@ -68,21 +68,21 @@ def _resolve_head_blobs(paths: list[str]) -> dict[str, str]:
6868
"""
6969
if not paths:
7070
return {}
71-
raw = _git_bytes("ls-tree", "-z", "HEAD", "--", *paths)
71+
raw = _git_bytes("ls-tree", "-z", "HEAD", "--", *paths).decode("utf-8")
7272
out: dict[str, str] = {p: "" for p in paths}
73-
for entry in raw.split(b"\x00"):
73+
for entry in raw.split("\0"):
7474
if not entry:
7575
continue
7676
# Format: "<mode> <type> <sha>\t<path>"
77-
meta, _, path_b = entry.partition(b"\t")
77+
meta, _, path = entry.partition("\t")
7878
try:
79-
_mode, kind, sha = meta.split(b" ")
79+
_mode, kind, sha = meta.split(" ")
8080
except ValueError:
8181
continue
82-
if kind != b"blob":
82+
if kind != "blob":
8383
# Submodule (commit) or tree — not a regular file we can diff.
8484
continue
85-
out[path_b.decode("utf-8")] = sha.decode("ascii")
85+
out[path] = sha
8686
return out
8787

8888

0 commit comments

Comments
 (0)