@@ -180,41 +180,41 @@ runs:
180
180
if [ -n "${{ inputs.preset }}" ]; then
181
181
case "${{ inputs.preset }}" in
182
182
"pr")
183
- # PR preset: Full validation with preview for PRs
184
- LINT_MARKDOWN="true"
185
- CHECK_FORMAT="true"
186
- CHECK_LINKS="true"
187
- CHECK_XREFS="true"
188
- LINT_VALE="true"
189
- GEN_PREVIEW="true"
190
- POST_COMMENT="true"
191
- CREATE_ISSUES="false"
192
- FAIL_ON_ERROR="false"
183
+ # PR preset: Comprehensive validation with preview for PRs
184
+ LINT_MARKDOWN="true" # Ensure markdown format is correct
185
+ CHECK_FORMAT="true" # Check table formatting
186
+ CHECK_LINKS="true" # Verify all links work
187
+ CHECK_XREFS="true" # Check document cross-references
188
+ LINT_VALE="true" # Run style checks
189
+ GEN_PREVIEW="true" # Generate preview links
190
+ POST_COMMENT="true" # Post comment with results
191
+ CREATE_ISSUES="false" # No auto-issue creation for PRs
192
+ FAIL_ON_ERROR="false" # Don't fail workflow to allow previews with warnings
193
193
echo "::notice::Applied PR preset configuration"
194
194
;;
195
195
"post-merge")
196
- # Post-merge preset: Focus on link checking and issue creation
196
+ # Post-merge preset: Lightweight check focused on link integrity
197
197
LINT_MARKDOWN="false"
198
198
CHECK_FORMAT="false"
199
- CHECK_LINKS="true"
200
- CHECK_XREFS="true"
201
- LINT_VALE="false"
199
+ CHECK_LINKS="true" # Only check links after merge to main
200
+ CHECK_XREFS="false" # Cross-references should be checked pre-merge
201
+ LINT_VALE="false" # Style should be checked pre-merge
202
202
GEN_PREVIEW="false"
203
203
POST_COMMENT="false"
204
- CREATE_ISSUES="true "
204
+ CREATE_ISSUES="false "
205
205
FAIL_ON_ERROR="false"
206
206
echo "::notice::Applied post-merge preset configuration"
207
207
;;
208
208
"weekly")
209
- # Weekly check preset: Focus on links with notifications
210
- LINT_MARKDOWN="false "
211
- CHECK_FORMAT="false "
209
+ # Weekly check preset: Comprehensive validation with notifications (no style checks)
210
+ LINT_MARKDOWN="true "
211
+ CHECK_FORMAT="true "
212
212
CHECK_LINKS="true"
213
213
CHECK_XREFS="true"
214
- LINT_VALE="false"
214
+ LINT_VALE="false" # Skip Vale style checking in weekly checks
215
215
GEN_PREVIEW="false"
216
216
POST_COMMENT="false"
217
- CREATE_ISSUES="true"
217
+ CREATE_ISSUES="true" # Create issues for persistent problems
218
218
FAIL_ON_ERROR="true"
219
219
echo "::notice::Applied weekly check preset configuration"
220
220
;;
@@ -688,18 +688,18 @@ runs:
688
688
echo "message=Link checking is enabled" >> $GITHUB_OUTPUT
689
689
echo "::endgroup::"
690
690
691
- # Note: Style checking is now completely handled by errata-ai/vale-action in the unified workflow
691
+ # Note: Vale style checking is handled in the unified workflow
692
692
# This step exists solely to maintain compatibility with the workflow structure
693
693
- name : Report Vale style checking status
694
694
id : lint-vale
695
695
if : env.lint_vale == 'true' && steps.file-detection.outputs.has_changes == 'true'
696
696
shell : bash
697
697
run : |
698
698
echo "::group::Vale style checking"
699
- echo "Style checking is performed via the Vale GitHub Action "
700
- echo "This step is a placeholder for compatibility with the workflow structure "
699
+ echo "Style checking is performed inline in the unified workflow "
700
+ echo "This step is a placeholder for result collection "
701
701
echo "status=success" >> $GITHUB_OUTPUT
702
- echo "message=See Vale GitHub Action for style validation results" >> $GITHUB_OUTPUT
702
+ echo "message=See unified workflow for style validation results" >> $GITHUB_OUTPUT
703
703
echo "::endgroup::"
704
704
705
705
- name : Check for broken cross-references
@@ -921,7 +921,27 @@ runs:
921
921
fi
922
922
923
923
# === GitHub Comment Format ===
924
- GH_COMMENT="# 📚 Documentation Check Results\n\n"
924
+ GH_COMMENT="# 📚 Documentation Preview Ready ✅\n\n"
925
+
926
+ # Show preview link prominently first
927
+ if [ "${{ env.gen_preview }}" == "true" ]; then
928
+ GH_COMMENT+="## 🖥️ [View Documentation Preview](${{ steps.context-info.outputs.preview_url }})\n\n"
929
+
930
+ # Add direct links to changed files if available
931
+ if [ -n "${{ steps.file-detection.outputs.direct_links }}" ]; then
932
+ GH_COMMENT+="### 📄 Changed Files\n\n"
933
+
934
+ IFS=',' read -ra LINKS <<< "${{ steps.file-detection.outputs.direct_links }}"
935
+ for link in "${LINKS[@]}"; do
936
+ # Extract the file name for display
937
+ filename=$(basename "$link" | sed 's/.md$//')
938
+ GH_COMMENT+="- [$filename]($link)\n"
939
+ done
940
+ GH_COMMENT+="\n"
941
+ fi
942
+ fi
943
+
944
+ # Then show validation status
925
945
GH_COMMENT+="## 🔎 Status Overview\n\n"
926
946
GH_COMMENT+="${{ steps.aggregate-results.outputs.badge }}\n\n"
927
947
@@ -940,30 +960,12 @@ runs:
940
960
fi
941
961
done
942
962
943
- # Add preview section
963
+ # Add standard documentation links (moved from preview section)
944
964
if [ "${{ env.gen_preview }}" == "true" ]; then
945
- GH_COMMENT+="\n## 🖥️ Preview Your Changes\n\n"
946
- GH_COMMENT+="**🔗 [View Documentation Preview](${{ steps.context-info.outputs.preview_url }})**\n\n"
947
-
948
- # Add standard documentation links
949
- GH_COMMENT+="### Quick Links\n\n"
965
+ GH_COMMENT+="\n### Quick Links\n\n"
950
966
GH_COMMENT+="- [Main Docs](${{ steps.context-info.outputs.preview_url }})\n"
951
967
GH_COMMENT+="- [Installation Guide](${{ steps.context-info.outputs.install_url }})\n"
952
968
GH_COMMENT+="- [Getting Started](${{ steps.context-info.outputs.getting_started_url }})\n\n"
953
-
954
- # Add direct links to changed files if available
955
- if [ -n "${{ steps.file-detection.outputs.direct_links }}" ]; then
956
- GH_COMMENT+="<details>\n<summary><strong>📄 Direct Links to Changed Files</strong></summary>\n\n"
957
-
958
- IFS=',' read -ra LINKS <<< "${{ steps.file-detection.outputs.direct_links }}"
959
- for link in "${LINKS[@]}"; do
960
- # Extract the file name for display
961
- filename=$(basename "$link" | sed 's/.md$//')
962
- GH_COMMENT+="- [$filename]($link)\n"
963
- done
964
-
965
- GH_COMMENT+="</details>\n\n"
966
- fi
967
969
fi
968
970
969
971
# Always add the documentation validation status section
@@ -1006,9 +1008,9 @@ runs:
1006
1008
1007
1009
GH_COMMENT+="</details>\n\n"
1008
1010
1009
- # Add footer
1011
+ # Add footer with timestamp
1010
1012
GH_COMMENT+="---\n"
1011
- GH_COMMENT+="<sub>🤖 This comment is automatically generated and updated when documentation changes .</sub>"
1013
+ GH_COMMENT+="<sub>🤖 This comment was last updated on $(date -u "+%Y-%m-%d %H:%M:%S UTC") when validation completed .</sub>"
1012
1014
1013
1015
# Output the formatted results
1014
1016
echo "summary<<EOF" >> $GITHUB_OUTPUT
0 commit comments