Skip to content

Commit 89a2f3e

Browse files
authored
Collapse condition of zero checkboxes (#12811)
1 parent 478ac7c commit 89a2f3e

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -383,12 +383,6 @@ jobs:
383383
BOXES=$(printf '%s\n' "$BODY" | grep "^- \[")
384384
echo "Found boxes: $BOXES"
385385
386-
# Ensure at least one checkbox exists
387-
if [ -z "$BOXES" ]; then
388-
echo "❌ No checkboxes found in '### Mandatory checks'!"
389-
exit 1
390-
fi
391-
392386
while IFS= read -r line; do
393387
if ! printf '%s\n' "$line" | grep -Eq "^- \[(x|/| )\] "; then
394388
echo "❌ Found improperly formatted checkbox: '$line'"
@@ -399,11 +393,11 @@ jobs:
399393
LINE_COUNT=$(echo "$BOXES" | wc -l)
400394
401395
if [ "$LINE_COUNT" -ne 7 ]; then
402-
echo "❌ $LINE_COUNT instead of 7 lines"
396+
echo "❌ Found $LINE_COUNT lines instead of 7 required lines"
403397
exit 1
404398
fi
405399
406-
echo "✅ All checkboxes are in the correct format."
400+
echo "✅ All checkboxes are present and in the correct format."
407401
env:
408402
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
409403

0 commit comments

Comments
 (0)