From 7993ff0a05e6247e5be331e8392d65f71abc0a23 Mon Sep 17 00:00:00 2001 From: renner <80410025+renner0e@users.noreply.github.com> Date: Wed, 16 Sep 2026 10:27:19 +0200 Subject: [PATCH] fix(changelogs): handle multiple builds on the same day correctly (#2879) In the last release [1] I noticed that instead of comparing XX15.2 and XX15.1 with each other, the tag from last week got resolved because only the highest index point of that day was kept. So we compared XX15.2 with XX09.1, that resulted in essentially a lot of duplicate information in that release, instead of just a small addition. The expected output of the test seems like a typo to me. [1] https://github.com/ublue-os/aurora/releases/tag/stable-20260915.2 --- .github/changelogs.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/changelogs.py b/.github/changelogs.py index e8646192..95ba3fe9 100644 --- a/.github/changelogs.py +++ b/.github/changelogs.py @@ -164,7 +164,7 @@ def get_tags(target: str, manifests: dict[str, Any]): When multiple builds on the same day, highest index wins: >>> get_tags("stable", imgs(["stable-20260602.1", "stable-20260609.1", "stable-20260609.2"])) - ('stable-20260602.1', 'stable-20260609.2') + ('stable-20260609.1', 'stable-20260609.2') Most recent tags as of today: >>> get_tags("stable", imgs(["stable-20260526", "stable-20260602", "stable-20260602.1", "stable-20260609", "stable-20260609.1"])) @@ -191,13 +191,12 @@ def get_tags(target: str, manifests: dict[str, Any]): if tag not in manifest["RepoTags"]: all_tags.remove(tag) - # Group by date, keep the highest-indexed tag per date by_date = defaultdict(list) for tag in all_tags: date, idx = parse_tag(tag) by_date[date].append((idx, tag)) - flattened = [max(entries)[1] for entries in by_date.values()] + flattened = [tag for entries in by_date.values() for idx, tag in entries if idx > 0] tags = sorted(flattened, key=parse_tag) if len(tags) < 2: