Skip to content

fix: replace broken check-links script with working tool#525

Merged
hami-robot[bot] merged 1 commit into
Project-HAMi:masterfrom
mesutoezdil:fix/check-links-script
Jul 3, 2026
Merged

fix: replace broken check-links script with working tool#525
hami-robot[bot] merged 1 commit into
Project-HAMi:masterfrom
mesutoezdil:fix/check-links-script

Conversation

@mesutoezdil

@mesutoezdil mesutoezdil commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

check-links called npx html-link-checker, a package that does not exist on npm. The script always failed with a 404 for anyone who ran it. Swapped in linkinator, which is real and actively maintained.

Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
@netlify

netlify Bot commented Jul 2, 2026

Copy link
Copy Markdown

Deploy Preview for project-hami ready!

Name Link
🔨 Latest commit 2a28e81
🔍 Latest deploy log https://app.netlify.com/projects/project-hami/deploys/6a463a9ca18b3a0008d6bf0e
😎 Deploy Preview https://deploy-preview-525--project-hami.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@hami-robot hami-robot Bot added the size/XS label Jul 2, 2026
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The check-links npm script in package.json was updated to use linkinator ./build --recurse instead of html-link-checker --root ./build --quiet, while retaining the || true fallback behavior.

Changes

Link Checker Update

Layer / File(s) Summary
Update check-links script
package.json
Replaced html-link-checker with linkinator for link validation of the build output, keeping the non-failing || true behavior.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

A tiny hop, a script anew,
Linkinator checks each link for you.
Old checker rests, its job now done,
Through ./build it recurses, one by one.
🐇🔗✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: fixing the broken check-links script by switching to a working tool.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
package.json (2)

26-26: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider pinning linkinator as a devDependency.

This script now relies on npx linkinator resolving an unpinned, latest published version at run time. Given the exact failure this PR fixes was caused by relying on an npx-resolved package name that no longer existed, pinning linkinator in devDependencies (and invoking it without npx, or with a version-locked npx call) would reduce the chance of a similar future breakage and make CI/local runs reproducible.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 26, The check-links script currently uses npx
linkinator, which can resolve an unpinned version at runtime and makes CI/local
runs non-reproducible. Update the package.json script to use a version-pinned
linkinator from devDependencies, and adjust the check-links command to invoke
the locally installed binary (or a version-locked npx call) so the behavior
stays stable; reference the check-links script entry and the linkinator package
declaration when making the change.

26-26: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Align flags with the CI linkinator invocation.

The .github/workflows/docs-health.yml step invoking linkinator uses --skip "^https?://" to avoid checking external links: the docs-health workflow runs a “Broken Internal Link Check” step that invokes npx --yes linkinator ./build --recurse and fails the workflow when BROKEN appears in output. This local script omits --skip, so it will also probe every external URL. Since linkinator's default request timeout is 0 (no timeout), an unresponsive external site can make this "instant" local check hang indefinitely rather than failing fast.

Consider mirroring the CI flags (at least --skip "^https?://", and optionally --yes to skip the npx install-confirmation prompt for first-time runs):

♻️ Suggested alignment
-    "check-links": "npm run build && npx linkinator ./build --recurse || true",
+    "check-links": "npm run build && npx --yes linkinator ./build --recurse --skip \"^https?://\" || true",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 26, The check-links script is not aligned with the CI
Linkinator invocation and may hang on external URLs. Update the package.json
check-links command to match the docs-health workflow behavior by adding the
same skip pattern used with linkinator (for example in the check-links script
that runs npm run build and npx linkinator ./build --recurse), and consider
using the no-prompt npx form as well so local runs behave consistently and avoid
probing external links.

Source: Linked repositories

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@package.json`:
- Line 26: The check-links script currently uses npx linkinator, which can
resolve an unpinned version at runtime and makes CI/local runs non-reproducible.
Update the package.json script to use a version-pinned linkinator from
devDependencies, and adjust the check-links command to invoke the locally
installed binary (or a version-locked npx call) so the behavior stays stable;
reference the check-links script entry and the linkinator package declaration
when making the change.
- Line 26: The check-links script is not aligned with the CI Linkinator
invocation and may hang on external URLs. Update the package.json check-links
command to match the docs-health workflow behavior by adding the same skip
pattern used with linkinator (for example in the check-links script that runs
npm run build and npx linkinator ./build --recurse), and consider using the
no-prompt npx form as well so local runs behave consistently and avoid probing
external links.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 91f947ab-50be-42ae-a05d-093aaf68d375

📥 Commits

Reviewing files that changed from the base of the PR and between 81c7af9 and 2a28e81.

📒 Files selected for processing (1)
  • package.json

@windsonsea windsonsea left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm
/approve

@hami-robot

hami-robot Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mesutoezdil, windsonsea

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hami-robot hami-robot Bot added the approved label Jul 3, 2026
@hami-robot hami-robot Bot merged commit e3fc4d0 into Project-HAMi:master Jul 3, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants