Skip to content

Commit a5a3d29

Browse files
EdwardAngertClaude
and
Claude
committed
fix: correct Vale file format to use proper JSON array
- Fix 'path is invalid; falling back to all' warning - Use proper JSON array format as specified in Vale action docs - Pass files_json directly to Vale action instead of space-separated list - Add helpful comments explaining the formatting choice 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 2173f53 commit a5a3d29

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/docs-unified.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127
128128
# Vale style checking for documentation - only checks changed files
129129
# This is the ONLY place Vale is actually run - the action in docs-core is a placeholder
130-
# Extract and format changed files for Vale in a way similar to tj-actions/changed-files
130+
# Format changed files for Vale
131131
- name: Extract changed files for Vale
132132
id: extract-changed-files
133133
if: steps.docs-core-setup.outputs.needs_vale == 'true' && steps.docs-core-setup.outputs.has_changes == 'true'
@@ -142,20 +142,20 @@ jobs:
142142
exit 0
143143
fi
144144
145-
# Extract files as comma-separated string (Vale action input format)
146-
CHANGED_FILES=$(echo "$CHANGED_FILES_JSON" | jq -r 'join(",")')
147-
echo "Files to check: $CHANGED_FILES"
148-
echo "files_to_check=$CHANGED_FILES" >> $GITHUB_OUTPUT
145+
# Vale action accepts the original JSON array format, so we can pass it directly
146+
echo "Files to check (JSON format): $CHANGED_FILES_JSON"
147+
echo "files_json=$CHANGED_FILES_JSON" >> $GITHUB_OUTPUT
149148
150-
# Create space-separated output as well (like tj-actions/changed-files)
151-
CHANGED_FILES_SPACES=$(echo "$CHANGED_FILES_JSON" | jq -r 'join(" ")')
152-
echo "all_changed_files=$CHANGED_FILES_SPACES" >> $GITHUB_OUTPUT
149+
# For debugging, also store simpler formats
150+
echo "all_files=$(echo "$CHANGED_FILES_JSON" | jq -r 'join(" ")')" >> $GITHUB_OUTPUT
153151
152+
# Use Vale action to check documentation style
154153
- name: Run Vale style checks
155-
if: steps.docs-core-setup.outputs.needs_vale == 'true' && steps.extract-changed-files.outputs.files_to_check != ''
154+
if: steps.docs-core-setup.outputs.needs_vale == 'true' && steps.extract-changed-files.outputs.files_json != ''
156155
uses: errata-ai/vale-action@v2.1.1
157156
with:
158-
files: ${{ steps.extract-changed-files.outputs.files_to_check }}
157+
# According to Vale action docs, it accepts a JSON array format
158+
files: ${{ steps.extract-changed-files.outputs.files_json }}
159159
reporter: github-check
160160
fail_on_error: false
161161
vale_flags: "--config=.github/docs/vale/.vale.ini"

0 commit comments

Comments
 (0)