@@ -217,7 +217,7 @@ runs:
217217 LINT_VALE="false" # Skip Vale style checking in weekly checks
218218 GEN_PREVIEW="false"
219219 POST_COMMENT="false"
220- CREATE_ISSUES="true" # Create issues for persistent problems
220+ CREATE_ISSUES="false" # Issue creation not implemented yet (changed to false for accuracy)
221221 FAIL_ON_ERROR="true"
222222 echo "::notice::Applied weekly check preset configuration"
223223 ;;
@@ -330,21 +330,18 @@ runs:
330330 # Check which tools we'll need based on enabled validations
331331 NEEDS_PNPM="false"
332332 NEEDS_NODE="false"
333- NEEDS_VALE="false"
333+ # Note: Vale is now handled via GitHub Action, not manual installation
334334
335335 if [ "${{ env.lint_markdown }}" == "true" ] || [ "${{ env.check_format }}" == "true" ]; then
336336 NEEDS_PNPM="true"
337337 NEEDS_NODE="true"
338338 fi
339339
340- if [ "${{ env.lint_vale }}" == "true" ]; then
341- NEEDS_VALE="true"
342- fi
343-
344340 # Output for workflow to use
345341 echo "needs_pnpm=$NEEDS_PNPM" >> $GITHUB_OUTPUT
346342 echo "needs_node=$NEEDS_NODE" >> $GITHUB_OUTPUT
347- echo "needs_vale=$NEEDS_VALE" >> $GITHUB_OUTPUT
343+ # Vale is now handled by an action, no longer need this output
344+ echo "needs_vale=false" >> $GITHUB_OUTPUT
348345
349346# === PHASE 1D: CONTEXT EXTRACTION ===
350347# Centralized PR and branch information extraction
@@ -701,144 +698,65 @@ runs:
701698 echo "message=Link checking is enabled" >> $GITHUB_OUTPUT
702699 echo "::endgroup::"
703700
704- # Vale style checking - rely on the Valeinstalled in the parent workflow
701+ # Use theofficial ValeGitHub Action for style checking
705702 -name :Run Vale style checks
706703id :lint-vale
707704if :env.lint_vale == 'true' && steps.file-detection.outputs.has_changes == 'true'
705+ uses :errata-ai/vale-action@reviewdog
706+ with :
707+ files :${{ steps.file-detection.outputs.changed_files_csv }}
708+ fail_on_error :false
709+ reporter :github-check
710+ token :${{ inputs.github-token }}
711+ vale_flags :" --config=.github/docs/vale/.vale.ini"
712+
713+ # Process Vale results for consistent output format
714+ -name :Process Vale results
715+ id :process-vale-results
716+ if :env.lint_vale == 'true' && steps.file-detection.outputs.has_changes == 'true'
708717shell :bash
709718run :|
710- echo "::group::Valestyle checking "
719+ echo "::group::Valeresults processing "
711720
712721 # Get the files to check from the detection step
713722 CHANGED_FILES_JSON='${{ steps.file-detection.outputs.changed_files_json }}'
714723
715724 # Skip if no files to check
716725 if [ "$CHANGED_FILES_JSON" == "[]" ] || [ -z "$CHANGED_FILES_JSON" ]; then
717- echo "No filesto check with Vale"
726+ echo "No fileswere checked with Vale"
718727 echo "status=success" >> $GITHUB_OUTPUT
719728 echo "message=No files to check" >> $GITHUB_OUTPUT
720729 echo "::endgroup::"
721730 exit 0
722731 fi
723732
724- # Extract markdown filesto check
725- FILES_TO_CHECK =$(echo "$CHANGED_FILES_JSON" | jq -r '.[] | select(endswith(".md"))' | tr'\n' ' ')
733+ # Extract markdown filesthat were checked
734+ FILES_COUNT =$(echo "$CHANGED_FILES_JSON" | jq -r '.[] | select(endswith(".md"))' |wc -l | tr-d ' ')
726735
727- if [-z "$FILES_TO_CHECK" ]; then
728- echo "No markdown filesto check "
736+ if [$FILES_COUNT -eq 0 ]; then
737+ echo "No markdown fileswere checked "
729738 echo "status=success" >> $GITHUB_OUTPUT
730739 echo "message=No markdown files to check" >> $GITHUB_OUTPUT
731740 echo "::endgroup::"
732741 exit 0
733742 fi
734743
735- echo "Found markdown files to check with Vale"
736- FILE_COUNT=$(echo "$FILES_TO_CHECK" | wc -w | tr -d ' ')
737- echo "Found $FILE_COUNT markdown files to check"
738-
739- # Verify Vale is available (should be installed by the parent workflow)
740- if ! command -v vale &> /dev/null; then
741- echo "Vale command not found, it should be installed by the parent workflow"
742- echo "status=skipped" >> $GITHUB_OUTPUT
743- echo "message=Vale not installed" >> $GITHUB_OUTPUT
744- echo "::endgroup::"
745- exit 0
746- fi
747-
748- # Show Vale version
749- echo "Using Vale version:"
750- vale --version
751-
752- echo "Running Vale checks on $FILE_COUNT files..."
753-
754- # Create a temporary directory for results
755- TEMP_DIR=$(mktemp -d)
756- trap 'rm -rf "$TEMP_DIR"' EXIT
757-
758- # Run Vale on files in chunks (to avoid command line length limits)
759- # Create chunks of files (maximum 10 files per chunk)
760- CHUNK_SIZE=10
761- CHUNKS=()
762- CHUNK=""
763- COUNT=0
764-
765- for FILE in $FILES_TO_CHECK; do
766- if [ $COUNT -eq $CHUNK_SIZE ]; then
767- CHUNKS+=("$CHUNK")
768- CHUNK="$FILE"
769- COUNT=1
770- else
771- CHUNK="$CHUNK $FILE"
772- COUNT=$((COUNT + 1))
773- fi
774- done
775-
776- # Add the last chunk if not empty
777- if [ -n "$CHUNK" ]; then
778- CHUNKS+=("$CHUNK")
779- fi
780-
781- # Process each chunk and combine results
782- echo "[" > "$TEMP_DIR/combined_results.json"
783- FIRST_CHUNK=true
744+ # Vale action doesn't provide a specific output we can use directly
745+ # So we'll record that it ran successfully and was integrated
784746
785- for ((i=0; i<${#CHUNKS[@]}; i++)); do
786- CHUNK_FILES="${CHUNKS[$i]}"
787- CHUNK_OUTPUT="$TEMP_DIR/chunk_$i.json"
788-
789- echo "Processing chunk $((i+1))/${#CHUNKS[@]} ($(echo "$CHUNK_FILES" | wc -w | tr -d ' ') files)"
790-
791- # Run Vale on this chunk of files
792- vale --no-exit --output=JSON --config=.github/docs/vale/.vale.ini $CHUNK_FILES > "$CHUNK_OUTPUT" 2>/dev/null ||true
793-
794- # Verify JSON output and append to combined results
795- if [ -s "$CHUNK_OUTPUT" ] && jq empty "$CHUNK_OUTPUT" 2>/dev/null; then
796- # Add separator between chunks if not first chunk
797- if [ "$FIRST_CHUNK" = true ]; then
798- FIRST_CHUNK=false
799- elif [ -s "$CHUNK_OUTPUT" ]; then
800- echo "," >> "$TEMP_DIR/combined_results.json"
801- fi
802-
803- # Add content without brackets
804- jq -c '.[]' "$CHUNK_OUTPUT" >> "$TEMP_DIR/combined_results.json" || echo "Error processing chunk $i"
805- else
806- echo "No valid results from chunk $i"
807- fi
808- done
809-
810- # Close the combined JSON array
811- echo "]" >> "$TEMP_DIR/combined_results.json"
812-
813- # Fix JSON if needed
814- if ! jq empty "$TEMP_DIR/combined_results.json" 2>/dev/null; then
815- echo "Warning: Invalid combined JSON output, creating empty array"
816- echo "[]" > "$TEMP_DIR/combined_results.json"
817- fi
818-
819- # Extract and analyze results
820- VALE_OUTPUT=$(cat "$TEMP_DIR/combined_results.json")
821-
822- # Store results
823- if [ "$VALE_OUTPUT" = "[]" ] || [ "$(echo "$VALE_OUTPUT" | jq 'length')" -eq 0 ]; then
824- echo "Vale check passed: No style issues found"
747+ # Determine status based on Vale action
748+ if [ "${{ steps.lint-vale.outcome }}" == "success" ]; then
749+ echo "Vale check completed successfully"
825750 echo "status=success" >> $GITHUB_OUTPUT
826- echo "message=No style issues found in $FILE_COUNT files" >> $GITHUB_OUTPUT
827- else
828- # Count issues
829- ISSUE_COUNT=$(echo "$VALE_OUTPUT" | jq 'length')
830- echo "Vale found $ISSUE_COUNT style issues in $FILE_COUNT files"
831-
832- # Group issues by file for better readability
833- echo "$VALE_OUTPUT" | jq -r 'group_by(.Path) | .[] | .[0].Path + ":" + (. | length | tostring) + " issues"'
834-
835- # Show details of first 10 issues
836- echo "First 10 issues (detail):"
837- echo "$VALE_OUTPUT" | jq -r '.[] | "\(.Path):\(.Line):\(.Column) - \(.Message) (\(.Check))"' | head -10
838-
751+ echo "message=Style checking completed on $FILES_COUNT files" >> $GITHUB_OUTPUT
752+ elif [ "${{ steps.lint-vale.outcome }}" == "failure" ]; then
753+ echo "Vale found style issues"
839754 echo "status=warning" >> $GITHUB_OUTPUT
840- echo "message=Found $ISSUE_COUNT style issues in $FILE_COUNT files" >> $GITHUB_OUTPUT
841- echo "issues=$VALE_OUTPUT" >> $GITHUB_OUTPUT
755+ echo "message=Style issues found in documentation" >> $GITHUB_OUTPUT
756+ else
757+ echo "Vale check was skipped or had issues"
758+ echo "status=skipped" >> $GITHUB_OUTPUT
759+ echo "message=Vale check was skipped or had issues" >> $GITHUB_OUTPUT
842760 fi
843761
844762 echo "::endgroup::"
@@ -1049,7 +967,7 @@ runs:
1049967 {
1050968 "enabled": "${{ env.lint_vale }}",
1051969 "name": "Vale Style",
1052- "step_id": "lint -vale",
970+ "step_id": "process -vale-results ",
1053971 "guidance": "Follow style guidelines or use inline comments to suppress rules",
1054972 "fix_command": "vale --no-exit --config=.github/docs/vale/.vale.ini <filename>"
1055973 },
@@ -1399,9 +1317,14 @@ runs:
13991317 case "$CHANNEL" in
14001318 "github-issue")
14011319 if [ "${{ env.create_issues }}" == "true" ] && [ "${{ steps.format-results.outputs.has_issues }}" == "true" ]; then
1402- echo "Would create GitHub issue here with appropriate API calls"
1403- echo "Issue would include formatted information about failures"
1404- echo "This is a placeholder for the actual implementation"
1320+ echo "::warning::GitHub issue creation functionality is not implemented yet - this is a placeholder"
1321+ echo "::notice::To implement issue creation, this would use the GitHub API to create issues for validation failures"
1322+ echo "::notice::See: https://docs.github.com/en/rest/issues/issues?apiVersion=2022-11-28#create-an-issue"
1323+ # TODO: Implementation would look like:
1324+ # curl -X POST -H "Authorization: token ${{ inputs.github-token }}" \
1325+ # -H "Accept: application/vnd.github+json" \
1326+ # https://api.github.com/repos/${{ github.repository }}/issues \
1327+ # -d '{"title":"Documentation validation issues","body":"...","labels":["documentation","bug"]}'
14051328 fi
14061329 ;;
14071330 "slack")