From 8cc70d6fe7947c5084bde84b178c35204d632fd0 Mon Sep 17 00:00:00 2001 From: MatthewMiddlehurst Date: Wed, 27 Nov 2024 13:04:58 +0000 Subject: [PATCH] fix changelog gen --- .github/utilities/changelog_generator.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/utilities/changelog_generator.py b/.github/utilities/changelog_generator.py index 713dcc78f6..574e5bfa2b 100755 --- a/.github/utilities/changelog_generator.py +++ b/.github/utilities/changelog_generator.py @@ -28,7 +28,7 @@ def fetch_merged_pull_requests(page: int = 1) -> list[dict]: "base": "main", "state": "closed", "page": page, - "per_page": 50, + "per_page": 100, "sort": "updated", "direction": "desc", } @@ -65,13 +65,9 @@ def fetch_pull_requests_since_last_release() -> list[dict]: all_pulls = [] while not is_exhausted: pulls = fetch_merged_pull_requests(page=page) - all_pulls.extend( - [p for p in pulls if parser.parse(p["merged_at"]) > published_at] - ) - is_exhausted = ( - any(parser.parse(p["merged_at"]) < published_at for p in pulls) - or len(pulls) == 0 - ) + is_exhausted = len(pulls) == 0 + pulls = [p for p in pulls if parser.parse(p["merged_at"]) > published_at] + all_pulls.extend(pulls) page += 1 return all_pulls