Fix broken detector/fixer chaining links in generated workflow docs#866
Draft
github-actions[bot] wants to merge 2 commits intomainfrom
Draft
Fix broken detector/fixer chaining links in generated workflow docs#866github-actions[bot] wants to merge 2 commits intomainfrom
github-actions[bot] wants to merge 2 commits intomainfrom
Conversation
Rewrite ../../docs/workflows/*.md links in generated gh-agent-workflow pages to ../*.md so strict MkDocs link checks resolve correctly. Update docs hook tests to assert the rewritten output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This fixes the strict MkDocs build failure caused by broken links in generated
workflows/gh-agent-workflows/*.mdpages.gh-agent-workflows/*/README.mdfiles use links like:../../docs/workflows/detector-fixer-chaining.mdDuring docs generation, those links were carried through unchanged, but from the generated page location they resolve to
docs/docs/workflows/...and fail strict link checks.What changed
docs/hooks.pyin_rewrite_sibling_workflow_linksto also rewrite:../../docs/workflows/<page>.md->../<page>.mdtests/test_docs_hooks.pyto assert this rewrite behavior.Why this works
Generated pages are emitted under
docs/workflows/gh-agent-workflows/, so links to docs pages one directory up should be../<page>.md.Validation
pytest tests/test_docs_hooks.py -vmkdocs build --strictBoth pass after this change.
Closes #865.
What is this? | From workflow: Trigger Bug Hunter
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.