Skip to content

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

Merged
hilram7 merged 20 commits into
devfrom
feature/md-extension-autofix
Apr 8, 2026
Merged

feat: auto-fix missing .md extensions on PRs + fix fs_sdd_delete pages #720
hilram7 merged 20 commits into
devfrom
feature/md-extension-autofix

Conversation

@hilram7

@hilram7hilram7 commented Apr 6, 2026

Copy link
Copy Markdown
Collaborator

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
  • Confirmed 11.6 fs_sdd_delete page renders correctly in dev server with proper sidebar title and frontmatter

Test plan post-merge

  • After the frontmatter follow-up PR (feature/frontmatter-autoinjection) merges, open a test PR adding files without .md extension and frontmatter
  • Verify the workflow renames test files with frontmatter injection and posts comments

Comment thread.github/workflows/md-extension-autofix.yml Fixed
…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
CollaboratorAuthor

@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
CollaboratorAuthor

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.
@hilram7

Copy link
Copy Markdown
CollaboratorAuthor

Coworker test results — feature/md-extension-autofix

@jth-nw — Linux (WSL2), 2026-04-07

  • Unit tests: 17 passed, 0 failed ✓
  • Script output matched expected JSON exactly ✓
  • All rename/skip/conflict behaviors correct ✓
  • Dev server: Test Article and Conflict Test appeared correctly ✓

@DanPiazza-Netwrix — Mac, 2026-04-07

  • Unit tests: 17 passed, 0 failed ✓
  • Script output matched expected JSON exactly ✓
  • Dev server: Test Article and Conflict Test appeared correctly ✓

@hilram7
hilram7 marked this pull request as ready for review April 7, 2026 20:21
@hilram7
hilram7 requested review from a team as code ownersApril 7, 2026 20:21
@github-actions

Copy link
Copy Markdown
Contributor

Auto-Fix Summary

2 issues fixed, 0 skipped across 2 files

CategoryFixes
Dale: wordiness2

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

@hilram7
hilram7 merged commit cd2fccd into devApr 8, 2026
9 of 10 checks passed
@hilram7
hilram7 deleted the feature/md-extension-autofix branch April 8, 2026 16:04
Sign up for freeto 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.

5 participants

@hilram7@github-advanced-security@tay-caliguiri@sanjay-meghani@jth-nw