Release tools: In bug fixes per release script, add a check for when a user puts the word "broken" in the working field

Occasionally users will fill out a bug report with the fields like:
```
Broken: A
Working: Also Broken in B
```

This can lead to bug fixes per release script classifying the report
incorrectly.

This commit adds a small check that sees if "broken" is in the working
field, and if it is, then avoid adding the versions in that working
field to the list of working versions used for classifcation since we
can't trust it.

Pull Request: https://projects.blender.org/blender/blender/pulls/136392
This commit is contained in:
Alaska
2025-03-25 07:09:04 +01:00
committed by Alaska
parent e87827834b
commit b805980c20

View File

@@ -543,7 +543,10 @@ def version_extraction(report_body: str) -> tuple[list[str], list[str]]:
broken_lines += f'{line}\n'
if lower_line.startswith('work'):
# Use `work` to be able to detect both "worked" and "working".
if not example_in_line:
if (not example_in_line) and not ("brok" in lower_line):
# Don't add the line to the working_lines if it contains the letters "brok"
# because it means the user probably wrote something like "Worked: It was also broken in X.X"
# which lead to incorrect information.
working_lines += f'{line}\n'
return get_version_numbers(broken_lines, working_lines)