-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Update script for backporting. #9685
Conversation
next_category = True | ||
|
||
if category in Description.MAP_CATEGORY_TO_LABEL: | ||
self.label_name = Description.MAP_CATEGORY_TO_LABEL[category] | ||
else: | ||
if not category: | ||
print('Cannot find category in pr description') |
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.
Maybe print PR number too?
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.
It is printed in message before. like
Trying to auto-label pull-request: 8882
@@ -10,6 +10,10 @@ class Description: | |||
'Performance Improvement': 'pr-performance', | |||
# 'Backward Incompatible Change': doesn't match anything | |||
'Build/Testing/Packaging Improvement': 'pr-build', | |||
'Non-significant (changelog entry is not needed)': 'pr-non-significant', |
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.
Maybe reuse pr-other
tag? It's shorter.
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 that tag pr-non-significant
is less surprising than pr-other
while converting from this description.
@@ -80,6 +80,8 @@ | |||
|
|||
members = set(github.get_members("ClickHouse", "ClickHouse")) | |||
def print_responsible(pull_request): | |||
if "author" not in pull_request or pull_request["author"] is 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.
In which cases this may happen?
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 had a case when there was an exception and pull_request["author"]
was None
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/nik-kochetov/dev/ClickHouse/utils/github/__main__.py", line 117, in <module>
print(f'{CROSS_MARK} {bad["number"]}: {bad["url"]} ({print_responsible(bad)})')
File "/home/nik-kochetov/dev/ClickHouse/utils/github/__main__.py", line 83, in print_responsible
if pull_request["author"]["login"] in members:
TypeError: 'NoneType' object is not subscriptable
But I have lost exact pr :(
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix
auto-label
for backporting script.