-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
chore: script for changelog #13588
chore: script for changelog #13588
Conversation
99ec6bf
to
019aaf1
Compare
4d12d9d
to
b2b9364
Compare
b2b9364
to
531828b
Compare
531828b
to
919165c
Compare
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.
Looks great! I just left a few small comments and nits.
RELEASING/changelog.py
Outdated
for file in commit.files: | ||
if "superset/migrations/versions/" in file.filename: | ||
return True | ||
return False |
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.
Nit suggestion:
for file in commit.files: | |
if "superset/migrations/versions/" in file.filename: | |
return True | |
return False | |
return any("superset/migrations/versions/" in file.filename for file in commit.files) |
RELEASING/changelog.py
Outdated
detail = self._pr_logs_with_details.get(pr_number) | ||
if detail: | ||
return detail | ||
else: |
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.
Nit: no need for else
here
RELEASING/changelog.py
Outdated
if pr_type: | ||
pr_type = pr_type.group().strip('"') | ||
else: | ||
pr_type = None |
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.
pr_type
will already by None
if it's false, so:
if pr_type: | |
pr_type = pr_type.group().strip('"') | |
else: | |
pr_type = None | |
if pr_type: | |
pr_type = pr_type.group().strip('"') |
RELEASING/changelog.py
Outdated
for label in labels: | ||
risk_label = re.match( | ||
r"^(blocking|risk|hold|revert|security vulnerability)", label.name | ||
) | ||
if risk_label is not None: | ||
return True | ||
return False |
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 wonder if we should move the regular expression r"^(blocking|risk|hold|revert|security vulnerability)"
to a constant, then this could be written:
for label in labels: | |
risk_label = re.match( | |
r"^(blocking|risk|hold|revert|security vulnerability)", label.name | |
) | |
if risk_label is not None: | |
return True | |
return False | |
return any(re.match(RISKY_LABEL, label.name) for label in labels) |
RELEASING/changelog.py
Outdated
@@ -269,14 +368,20 @@ def compare(base_parameters: BaseParameters) -> None: | |||
help="The github access token," | |||
" if not provided will try to fetch from GITHUB_TOKEN env var", | |||
) | |||
@click.option("--risk", is_flag=True, help="show all pull request with risky labels") |
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.
@click.option("--risk", is_flag=True, help="show all pull request with risky labels") | |
@click.option("--risk", is_flag=True, help="show all pull requests with risky labels") |
* change log with section * add risk flag for showing risk pull request * update changlog.md * lint mypy * small fixes
@betodealmeida @lilykuang I couldn't see #13157 in changelog although it is tagged 1.1. Something wrong? |
* change log with section * add risk flag for showing risk pull request * update changlog.md * lint mypy * small fixes
SUMMARY
--risk
flag for getting a list pull request with labelsblocking|risk|hold|revert|security vulnerability
database migrations
,features
,fixes
, andothers
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
ADDITIONAL INFORMATION