-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: updating release-note script to validate that all PRs have changelog label #4849
Conversation
akagami-harsh
commented
Oct 16, 2023
- [Feature]: (Re)Introduce changelog-related labels and require them for PRs #4799
- Alter the release notes script to validate that all PRs have changelog labels, fail if some don't and print their URLs so that the maintainer can fix them manually. This should ignore dependabot PRs automatically.
…labels Signed-off-by: Harshvir Potpose <[email protected]>
changelog_prs = [] | ||
other_prs = [] | ||
|
||
for pr in repository.get_pulls(state='closed'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will load all historical PRs, but we only need those which are in the commit history since the last releast
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
basically in L91 we already determine PRs
if other_prs: | ||
print('PRs without "changelog:" labels:') | ||
for pr in other_prs: | ||
print(f'{pr.title} - {pr.html_url}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tip:
- trim title to fixed length like 50chars
- use whitespace padding so that URL column always starts from the same place
@@ -16,6 +16,7 @@ | |||
import urllib.parse | |||
from os.path import expanduser | |||
import sys | |||
from github import Github |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the nice feature of the existing script is that it runs without extra dependencies that need to be pip-installed
High-level comment: the idea in the ticket is not that the release script must validate PR labels, but that it uses those labels to automatically organize changelog entries into different sections |
#4850, did better than mine , closing this one |