Skip to content

Commit

Permalink
Release notes should not include PRs (#2083)
Browse files Browse the repository at this point in the history
Co-authored-by: Gaurav Sheni <gvsheni@gmail.com>
  • Loading branch information
amontanez24 and gsheni authored Jun 21, 2024
1 parent 486519d commit 36a5619
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion scripts/release_notes_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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 = (
Expand Down

0 comments on commit 36a5619

Please sign in to comment.