8000 ci(links-check): add external link checker using linkinator-action by umxr · Pull Request #6386 · fastify/fastify · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@umxr
Copy link
@umxr umxr commented Nov 10, 2025

Adds external link validation to spot dead links (status code != 200)
while keeping existing internal link checker.

Fixes #6385

Checklist

umxr added 2 commits November 10, 2025 19:44
Adds external link validation to spot dead links (status code != 200)
while keeping existing internal link checker.

Fixes fastify#6385
@github-actions github-actions bot added the github actions Github actions related label Nov 10, 2025
@Fdawgs Fdawgs changed the title feat: add external link checker using linkinator-action ci(links-check): add external link checker using linkinator-action Nov 12, 2025
Copy link
Contributor
@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

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

Well I checked the sourcecode of linikator and linkinator-action and it seems trustable.

@umxr umxr requested a review from Fdawgs November 15, 2025 12:33
@jean-michelet
Copy link
Member
jean-michelet commented Nov 22, 2025

CI is green here while many broken links were found on #6394

Copy link
Member
@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member
@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

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

lgtm

CI is green here while many broken links were found on #6394

So it doesn't work @jean-michelet?

@jean-michelet
8000 Copy link
Member

I guess, but I don't really know the workflow so maybe @Fdawgs can tell us more about this.

@umxr
Copy link
Author
umxr commented Nov 23, 2025

I dont think the link checker workflow ran because it only triggers on markdown file changes:

paths: "**/*.md"

This PR initially only modified .github/workflows/links-check.yml, so the workflow never executed.

to test, I've added a trivial change to README.md to trigger the workflow and verify the external link checker works correctly.

@jean-michelet
Copy link
Member

We should probably fix the links here.


on:
pull_request:
paths:
Copy link
Member
@jean-michelet jean-michelet Nov 24, 2025

Choose a reason for hiding this comment

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

Shouldn't we detect when the workflow file itself is updated?

".github/workflows/links-check.yml"

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Nov 24, 2025
@umxr
Copy link
Author
umxr commented Nov 24, 2025

These links are flagged as "fragment not found" but are actually valid. They either use hash-based routing (SPAs) or the fragments do exist:

  - https://sinclairzx81.github.io/typebox/#/docs/overview/2_setup
  - https://getpino.io/#/
  - https://getpino.io/#/docs/api?id=opt-serializers
  - https://getpino.io/#/docs/redaction
  - https://github.com/fastify/fastify/issues/946#issuecomment-766319521
  - https://github.com/openjs-foundation/cross-project-council/blob/HEAD/PROJECT_PROGRESSION.md#at-large-projects
  - https://github.com/fastify/fastify/blob/94ea67ef2d8dce8a955d510cd9081aabd036fa85/test/hooks-async.js#L269-L275
  - https://github.com/galiprandi/fastify-lm#readme
  - https://github.com/fastify/fastify/issues/1426#issuecomment-817957913
  - https://github.com/pinojs/pino/blob/main/docs/api.md#level-string
  - https://github.com/pinojs/pino/blob/main/docs/api.md#serializers-object
  - https://github.com/pinojs/pino/blob/main/docs/api.md#options

I still expect the link checks to fail on some of these due to the action detecting a fragment in the URL, even though the links are correct. I'll review the CI again and look into adding these to linksToSkip or create a regex if needed.

Question re - https://www.letzdoitapp.com/ -> This domain appears to no longer exist. What should we do here - remove the link entirely, or keep the name but remove the hyperlink?

@jean-michelet
Copy link
Member

I suspect linkinator reports fragment links as broken when the corresponding id isn’t present in the HTML.
This is expected with HashRouter, but GitHub also generates its own slug-based anchors, which is surprisingly not detected by the tool.

@Eomm
Copy link
Member
Eomm commented Jan 17, 2026

we have this PR too: #6424

Not yet checked this PR to evaluate the differences tho

Copy link
Member
@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

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

linkinator is a good lib, the maintainer is active too, I think we can proceed with this, but CI needs to be fixed

CONTRIBUTING.md Outdated
file. This list is also sorted alphabetically so make sure to add your name
in the proper order. Use your GitHub profile icon for the `picture:` field.
5. Read the [pinned announcements](https://github.com/orgs/fastify/discussions/categories/announcements)
5. Read the [pinned announcements](https://github.com/fastify/fastify/discussions/categories/announcements)
Copy link
Member

Choose a reason for hiding this comment

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

this must not change, see the linksToSkip suggestion

Copy link
Author

Choose a reason for hiding this comment

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

updated here - 2359f2f

we have the following in link-checks.yml so i dont think we need to add the complete url to this property

linksToSkip: "https://github.com/orgs/fastify/.*"

- Hosting

**Before making any purchases**, initiate a [new discussion](https://github.com/orgs/fastify/discussions)
**Before making any purchases**, initiate a [new discussion](https://github.com/fastify/fastify/discussions)
Copy link
Member

Choose a reason for hiding this comment

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

this must not change, see the linksToSkip suggestion

Copy link
Author

Choose a reason for hiding this comment

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

updated here - 2359f2f

we have the following in link-checks.yml so i dont think we need to add the complete url to this property

linksToSkip: "https://github.com/orgs/fastify/.*"

- [Platformatic](https://platformatic.dev)

Past Sponsors:
- [LetzDoIt](https://www.letzdoitapp.com/)
Copy link
Member

Choose a reason for hiding this comment

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

This link is dead, why it has not been catched?

I think we need to update the paths

Copy link
Author

Choose a reason for hiding this comment

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

Updated here - 9750c33 the paths trigger from '.md' to '**/.md' so the workflow runs when any markdown file in the repository is modified (including those in subdirectories like test/bundler/README.md).

@Eomm
Copy link
Member
Eomm commented Jan 25, 2026

linkinator is a good lib, the maintainer is active too, I think we can proceed with this, but CI needs to be fixed

I checked the various PR and I think this one is good to go with some suggestions 👍🏼
Thanks @umxr for opening it

umxr and others added 6 commits January 25, 2026 16:48
Co-authored-by: Manuel Spigolon <behemoth89@gmail.com>
Signed-off-by: Umar Gora <umarg1997@gmail.com>
Co-authored-by: Manuel Spigolon <behemoth89@gmail.com>
Signed-off-by: Umar Gora <umarg1997@gmail.com>
Co-authored-by: Manuel Spigolon <behemoth89@gmail.com>
Signed-off-by: Umar Gora <umarg1997@gmail.com>
Copy link
Member
@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

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

lgtm

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

Labels

documentation Improvements or additions to documentation github actions Github actions related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check invalid links

7 participants

0