Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Migrate error messages to MDX and App Router #52038

Merged
merged 32 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tweaks
- fix double hash
- trigger workflow on error file changes
  • Loading branch information
Delba de Oliveira committed Jul 3, 2023
commit c937976a938a135885579fd7b7bf1d03611f60f4
2 changes: 1 addition & 1 deletion .github/actions/validate-docs-links/lib/index.js

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions .github/actions/validate-docs-links/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ async function prepareDocumentMapEntry(

// Checks if the links point to existing documents
function validateInternalLink(errors: Errors, href: string): void {
let link = href.replace(DOCS_PATH, '')
const [link, hash] = href.replace(DOCS_PATH, '').split('#')

let foundPage

if (link.startsWith('messages/')) {
Expand All @@ -222,8 +223,6 @@ function validateInternalLink(errors: Errors, href: string): void {
foundPage = documentMap.get(link)
}

const hash = href.split('#')[1] || ''

if (!foundPage) {
errors.brokenLinks.push(`${DOCS_PATH}${link}${hash ? '#' + hash : ''}`)
} else if (hash && !EXCLUDED_HASHES.includes(hash)) {
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/validate-docs-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
pull_request:
paths:
- 'docs/**.mdx'
- 'errors/*.mdx'

jobs:
link-check:
Expand Down
Loading