From 36a56198339aaee707fcbe6bfbb8d3dcbff4eef3 Mon Sep 17 00:00:00 2001 From: Andrew Montanez Date: Fri, 21 Jun 2024 11:01:24 -0500 Subject: [PATCH] Release notes should not include PRs (#2083) Co-authored-by: Gaurav Sheni --- scripts/release_notes_generator.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/release_notes_generator.py b/scripts/release_notes_generator.py index 8e7ba6ffb..d7c4d64cd 100644 --- a/scripts/release_notes_generator.py +++ b/scripts/release_notes_generator.py @@ -23,6 +23,14 @@ 'feature request', 'customer success', ] +ISSUE_LABELS_ORDERED_BY_IMPORTANCE = [ + 'feature request', + 'customer success', + 'bug', + 'documentation', + 'internal', + 'maintenance', +] NEW_LINE = '\n' GITHUB_URL = 'https://api.github.com/repos/sdv-dev/sdv' GITHUB_TOKEN = os.getenv('GH_ACCESS_TOKEN') @@ -64,6 +72,8 @@ def _get_issues_by_milestone(milestone): if not issues_on_page: break + # Filter our PRs + issues_on_page = [issue for issue in issues_on_page if issue.get('pull_request') is None] issues.extend(issues_on_page) page += 1 @@ -102,7 +112,7 @@ def _create_release_notes(issues_by_category, version, date): title = f'## v{version} - {date}' release_notes = f'{title}{NEW_LINE}{NEW_LINE}' - for category in ISSUE_LABELS + ['misc']: + for category in ISSUE_LABELS_ORDERED_BY_IMPORTANCE + ['misc']: issues = issues_by_category.get(category) if issues: section_text = (