Skip to content

Commit 4326860

Browse files
committed
Fix mainline verdict parser picking last keyword instead of first
When the verdict line contains multiple keywords (e.g. reviewer echoes all options), grep -oEi | tail -1 selected the last match which could be REGRESSED even when ADVANCED was the actual verdict. Changed to head -1 to pick the first keyword after the label.
1 parent 2ab5361 commit 4326860

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hooks/lib/loop-common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ extract_mainline_progress_verdict() {
588588

589589
# Extract the verdict word using grep -oEi (portable) instead of sed /I (GNU-only).
590590
# The preceding grep -Ei already ensures the line contains one of the three verdicts.
591-
verdict_value=$(printf '%s\n' "$verdict_line" | grep -oEi 'ADVANCED|STALLED|REGRESSED' | tail -1)
591+
verdict_value=$(printf '%s\n' "$verdict_line" | grep -oEi 'ADVANCED|STALLED|REGRESSED' | head -1)
592592
normalize_mainline_progress_verdict "$verdict_value"
593593
}
594594

0 commit comments

Comments
 (0)