scripts/autobump-sweep.py: keep the full escalation reason
The reason pattern stopped at the first ")", so a reason carrying its own parentheses reached the issue cut short, e.g. "(404/403". The engine closes the reason with "); evidence: <dir>", so match up to that instead. Signed-off-by: Zakk <zakk@gentoozh.org>
This commit is contained in:
1 parent
24a9fe389a
commit
c856da9f2d
1 file changed
+2
-1
@@ -429,7 +429,8 @@ def parse_verdict(verdict_json):
|
||||
def last_clear_reason(text):
|
||||
clear_reasons = []
|
||||
for line in text.split("\n"):
|
||||
match = re.search(r".*not mechanically safe \(([^)]+)\).*", line)
|
||||
# a reason can carry its own parentheses; the engine ends it with "); evidence: <dir>"
|
||||
match = re.search(r"not mechanically safe \((.+)\); evidence: ", line)
|
||||
if match:
|
||||
clear_reasons.append(match.group(1))
|
||||
return clear_reasons[-1] if clear_reasons else ""
|
||||
|
||||
Reference in new issue
Block a user