Skip to content

Conversation

@markstur
Copy link

@markstur markstur commented Jan 23, 2026

Summary

Add docs:ci:check:links to use mintlify to test internal links. Add docs:ci:check:links:external to test external links with markdown-link-check.

Currently avoiding the docs:check prefix because we have broken links that cause errors on commit. After doc links are fixed and ci passes, these could be renamed to docs:check (but maybe too slow).

Linked Issues

Fixes #1880

Documentation

  • No Docs Needed:

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jan 23, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @markstur, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the documentation quality by integrating automated link validation into the CI pipeline. It introduces distinct tasks for verifying both internal and external links, leveraging Mintlify for internal checks and the markdown-link-check tool for external URLs. This proactive approach aims to prevent broken links and maintain the reliability of the project's documentation.

Highlights

  • New CI Tasks for Link Validation: Introduced new CI tasks for automated documentation link validation.
  • Internal Link Checking: Implemented internal link checking using Mintlify's broken-links functionality.
  • External Link Checking: Set up external link checking with markdown-link-check, including a dedicated configuration file.
  • Configurable External Link Checker: Configured markdown-link-check to ignore local/relative paths and specific localhost URLs, and to handle retries for certain HTTP status codes.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/docs-check.yaml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces link validation for the documentation, which is a great addition for maintaining its quality. It adds two new scripts: one for internal links using mintlify and another for external links using markdown-link-check.

My review includes a couple of suggestions:

  • A correction in the markdown-link-check configuration to properly handle rate-limiting errors.
  • A performance improvement for the external link checking script.

I also noticed that a new transitive dependency, whatwg-encoding@3.1.1, is deprecated. This is not a critical issue and is likely outside of your direct control, but it's something to be aware of for future dependency updates.

Overall, the changes are well-structured and address an important maintenance aspect.

"retryOn429": true,
"retryCount": 3,
"fallbackRetryDelay": "30s",
"aliveStatusCodes": [200, 206, 301, 302, 307, 308, 403, 429]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The status code 429 (Too Many Requests) should be removed from aliveStatusCodes. Since retryOn429 is set to true, the link checker will automatically retry on this status code. If it still fails with a 429 after all retries, it should be treated as a failure, not a success. The markdown-link-check documentation explicitly states that 429 is not needed in aliveStatusCodes when retryOn429 is enabled.

Additionally, while including 403 (Forbidden) can help reduce false positives from sites that block automated checkers, it might also mask genuinely broken or access-restricted links. It would be better to apply this status code only to specific domains known to cause issues if possible.

Suggested change
"aliveStatusCodes": [200, 206, 301, 302, 307, 308, 403, 429]
"aliveStatusCodes": [200, 206, 301, 302, 307, 308, 403]

"update-openapi": "wget localhost:8333/api/v1/openapi.json -O api-reference/openapi.json"
"update-openapi": "wget localhost:8333/api/v1/openapi.json -O api-reference/openapi.json",
"check:links": "mintlify broken-links",
"check:links:external": "find . -type f \\( -name '*.md' -o -name '*.mdx' \\) -not -path './node_modules/*' -print0 | xargs -0 -I {} pnpm exec markdown-link-check --config .markdown-link-check.json --quiet {}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The check:links:external script invokes markdown-link-check for each file individually, which can be inefficient as it starts a new process for every markdown file. You can improve performance by passing all found files to a single markdown-link-check command using xargs without the -I {} option. This will process all files in one go.

Suggested change
"check:links:external": "find . -type f \\( -name '*.md' -o -name '*.mdx' \\) -not -path './node_modules/*' -print0 | xargs -0 -I {} pnpm exec markdown-link-check --config .markdown-link-check.json --quiet {}"
"check:links:external": "find . -type f \\( -name '*.md' -o -name '*.mdx' \\) -not -path './node_modules/*' -print0 | xargs -0 pnpm exec markdown-link-check --config .markdown-link-check.json --quiet"

@markstur
Copy link
Author

markstur commented Jan 23, 2026

Needs #1869 to fix links in dev and they need to be copied in to stable before this will pass. Right now it is correctly failing.

Needs #1894 to pass external link check

Add docs:ci:check:links to use mintlify to test internal links.
Add docs:ci:check:links:external to test external links with markdown-link-check.

Currently avoiding the docs:check prefix because we have broken links that cause errors on commit.
After doc links are fixed and ci passes, these could be renamed to docs:check (but maybe too slow).

Signed-off-by: Mark Sturdevant <mark.sturdevant@ibm.com>
Remove alive status coded 429 because retryOn429 is enabled.
Improve performance by processing files in one markdown-link-check.

Signed-off-by: Mark Sturdevant <mark.sturdevant@ibm.com>
@JanPokorny
Copy link
Collaborator

JanPokorny commented Jan 25, 2026

I fixed internal links and added validation in main, so that part is covered. (Sorry for work duplication, I saw the issue, thought it will be a quick one and didn't notice the assignment.)

External link validation could still be valuable, especially when cross linking to our other repos, but I'm afraid that it could create weird situations if it was part of the main commit checks -- build breaking for external reasons, basically. It'd probably work better if it instead ran in a separate job every day and sent an email / made an issue if there's something broken?

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

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Linting/Validation Rule for un-prefixed internal links

2 participants