Skip to content

Commit 62f8b9e

Browse files
authored
Merge pull request #104097 from maxwelldb/fix-vale-json-payload
[prow/ci] handle file-level issues in vale review script
2 parents ac48c5d + 40fc939 commit 62f8b9e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scripts/prow-vale-review.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@ do
9999
FILENAME=$(echo "$object" | jq -r '.path')
100100
LINE_NUMBER=$(echo "$object" | jq -r '.line')
101101

102+
# Line 1 errors are file-level issues. Always post these!
103+
if [[ "$LINE_NUMBER" -eq 1 ]]; then
104+
post_review_comment "$BODY" "$FILENAME" "$LINE_NUMBER"
105+
sleep 1
106+
continue
107+
fi
108+
102109
# Check the unified file diff for the alert and file
103110
file_diff=$(git diff --unified=0 --stat --diff-filter=AM HEAD~1 HEAD "${FILENAME}" ':(exclude)_unused_topics/*')
104111

0 commit comments

Comments
 (0)