Skip to content

feat: auto-fix missing .md extensions on PRs + fix fs_sdd_delete pages #720

Draft
hilram7 wants to merge 18 commits intodevfrom
feature/md-extension-autofix
Draft

feat: auto-fix missing .md extensions on PRs + fix fs_sdd_delete pages #720
hilram7 wants to merge 18 commits intodevfrom
feature/md-extension-autofix

Conversation

@hilram7
Copy link
Copy Markdown
Collaborator

@hilram7 hilram7 commented Apr 6, 2026

Summary

Adds a GitHub Actions workflow and shell script that automatically detects and renames files added to docs/ without a .md extension, then commits the fix and posts a PR comment. Also fixes the one known existing file missing the extension and adds missing frontmatter to both versions.

Changes

  • .github/workflows/md-extension-autofix.yml — new workflow, mirrors vale-autofix.yml pattern
  • scripts/md-extension-autofix.sh — detection, rename, link rewriting, JSON output
  • scripts/test-md-extension-autofix.sh — unit tests (17 passing)
  • docs/accessanalyzer/11.6/admin/jobs/instantjobs/fs_sdd_delete → renamed to .md with frontmatter added
  • docs/accessanalyzer/12.0/admin/jobs/instantjobs/fs_sdd_delete.md — frontmatter added
  • docs/kb/accessanalyzer/file-system-and-sensitive-data-discovery/delete-sdd-matches.md — fixed link text (NAA → Access Analyzer), removed .md from URLs, updated Related Links section

Testing

  • Unit tests: 17/17 passing (bash scripts/test-md-extension-autofix.sh)
  • Happy path: script correctly renamed fs_sdd_delete and a test KB file, both appeared in dev server
  • Skip — no frontmatter/heading: correctly placed in skipped with "Content doesn't look like markdown" reason
  • Skip — destination exists: correctly placed in skipped with "X.md already exists" reason
  • Pre-existing broken links confirmed: build failure on dev exists before this branch (Auditor KB anchor issue, unrelated)
  • Confirmed 11.6 fs_sdd_delete page renders correctly in dev server with proper sidebar title and frontmatter

Test plan post-merge

  • After merge, open a test PR adding a docs/kb/ file without .md and verify the workflow renames it and posts a comment

…d code in trusted context'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@hilram7
Copy link
Copy Markdown
Collaborator Author

hilram7 commented Apr 6, 2026

@claude fix the warning admonition format in both files — convert blockquotes to :::warning blocks

Convert raw Markdown blockquote WARNING to Docusaurus :::warning
admonition blocks in fs_sdd_delete.md for both 11.6 and 12.0.

Co-Authored-By: Claude <noreply@anthropic.com>
@hilram7
Copy link
Copy Markdown
Collaborator Author

hilram7 commented Apr 6, 2026

Ignoring the frontmatter/heading suggestions — keeping frontmatter minimal intentionally, as standardization will be handled in a follow-up PR using the same script. Heading is consistent with other articles in this and other products/subcategories.

Tested locally: 17 unit tests passed, live script test confirmed rename and git staging of extensionless file, test article verified in dev server sidebar.
@github-actions

This comment was marked as duplicate.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

Auto-Fix Summary

4 issues fixed, 0 skipped across 2 files

Category Fixes
Dale: idioms 2
Dale: wordiness 2

Ask @claude on this PR if you'd like an explanation of any fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants