Skip to content
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

Closed

Conversation

akagami-harsh
Copy link
Member

changelog_prs = []
other_prs = []

for pr in repository.get_pulls(state='closed'):
Copy link
Member

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

Copy link
Member

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}')
Copy link
Member

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
Copy link
Member

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

@yurishkuro
Copy link
Member

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

@akagami-harsh
Copy link
Member Author

#4850, did better than mine , closing this one

@akagami-harsh akagami-harsh deleted the Feature-#4799 branch October 19, 2023 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants