Tools: Check high priority module bugs against their IDs
This resolve issues where high priority bugs wouldn't be sorted if the name of a module label changes. Pull Request: https://projects.blender.org/blender/blender/pulls/127361
This commit is contained in:
@@ -69,6 +69,11 @@ def compile_list(severity: str) -> None:
|
||||
verbose=True,
|
||||
)
|
||||
|
||||
# Create a dictionary of format {module_id: module_name}
|
||||
module_label_ids = {}
|
||||
for module_name in modules:
|
||||
module_label_ids[modules[module_name].labelid] = module_name
|
||||
|
||||
uncategorized_reports = []
|
||||
|
||||
issues_json_sorted = sorted(issues_json, key=lambda x: x["number"])
|
||||
@@ -81,12 +86,19 @@ def compile_list(severity: str) -> None:
|
||||
|
||||
# Check reports module assignment and fill in data.
|
||||
for label_iter in issue["labels"]:
|
||||
label = label_iter["name"]
|
||||
if label not in modules:
|
||||
label_id = str(label_iter["id"])
|
||||
if label_id not in module_label_ids:
|
||||
continue
|
||||
|
||||
modules[label].buglist.append(f"[#{number}]({html_url})")
|
||||
modules[label].buglist_full.append(f"* [{title}]({html_url}) - {created_at}\n")
|
||||
current_module_name = module_label_ids[label_id]
|
||||
if current_module_name != label_iter["name"]:
|
||||
new_label_name = label_iter["name"]
|
||||
print(f"ALERT: The name of label of '{current_module_name}' changed.")
|
||||
print(f"The new name is '{new_label_name}'.")
|
||||
input("Press enter to continue: \n")
|
||||
|
||||
modules[current_module_name].buglist.append(f"[#{number}]({html_url})")
|
||||
modules[current_module_name].buglist_full.append(f"* [{title}]({html_url}) - {created_at}\n")
|
||||
break
|
||||
else:
|
||||
uncategorized_reports.append(f"[#{number}]({html_url})")
|
||||
|
||||
Reference in New Issue
Block a user