Skip to content

Add linkspector CI action #3939

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

Merged
merged 12 commits into from
May 6, 2025
Merged

Add linkspector CI action #3939

merged 12 commits into from
May 6, 2025

Conversation

StephenButtolph
Copy link
Contributor

@StephenButtolph StephenButtolph commented May 6, 2025

Why this should be merged

We currently have a number of broken links:

┌───────────────────────────────┬────────┐
│ 🟰 Total files checked        │     44 │
├───────────────────────────────┼────────┤
│ 🔗 Total links checked        │    241 │
├───────────────────────────────┼────────┤
│ 🌐 Hyperlinks                 │    119 │
├───────────────────────────────┼────────┤
│ 📁 File and header links      │    120 │
├───────────────────────────────┼────────┤
│ ✉️  Email links (Skipped)     │      2 │
├───────────────────────────────┼────────┤
│ ✅ Working links              │    223 │
├───────────────────────────────┼────────┤
│ 🚫 Failed links               │     16 │
└───────────────────────────────┴────────┘

How this works

  1. Fixes all broken links
  2. Adds link checking to CI

After merging this action will NOT become required, as sometimes the external websites are flaky.

How this was tested

Running linkspector check -s locally. (After this PR, the action behavior will need to be validated)
Can be installed locally with npm install -g @umbrelladocs/linkspector

Need to be documented in RELEASES.md?

No.

@meaghanfitzgerald
Copy link
Contributor

The linter is falsely rejecting https://github.com/prometheus/docs/blob/main/content/docs/instrumenting/exposition_formats.md in api/metrics/service.md. Might be due to the filename ending?

@meaghanfitzgerald
Copy link
Contributor

meaghanfitzgerald commented May 6, 2025

Link to prometheus repo fails no matter where I link within the repo

@StephenButtolph
Copy link
Contributor Author

The linter is falsely rejecting https://github.com/prometheus/docs/blob/main/content/docs/instrumenting/exposition_formats.md in api/metrics/service.md. Might be due to the filename ending?

It was reporting 429 (rate limited) so I had assumed locally it was because I had just hit it too many time locally... Seems like github has some aggressive RL... Switched to the (probably better) hosted rendering of the doc.

@meaghanfitzgerald
Copy link
Contributor

image

it failed to format it's own output correctly 🫠

@StephenButtolph
Copy link
Contributor Author

image it failed to format it's own output correctly 🫠

I care more about the ✅ and ❌. But yeah I noticed that as well haha, if you want to contribute to open source, seems like some low hanging fruit haha

@StephenButtolph StephenButtolph marked this pull request as ready for review May 6, 2025 17:13
@Copilot Copilot AI review requested due to automatic review settings May 6, 2025 17:13
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new CI action for link checking using linkspector, while also updating various documentation links and file paths to reflect recent restructurings.

  • Update README and related docs to reference new paths and packages
  • Fix typos and adjust link anchors for consistency
  • Introduce a new CI workflow for link linting

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
vms/example/xsvm/README.md Updated package and link references to use the new interchain messaging.
tests/fixture/e2e/describe.go Fixed a spelling mistake in a comment.
tests/e2e/README.md Adjusted file path references; updated link anchor (potential issue).
tests/antithesis/README.md Updated Antithesis documentation link.
snow/README.md Changed absolute links to relative links for networking components.
genesis/README.md Updated genesis file link to a relative path.
config/config.md Updated genesis documentation links.
api/metrics/service.md Updated Prometheus documentation link.
README.md Modified link anchor for autogenerated mocks section (potential issue).
.linkspector.yml Added configuration for link checking, excluding specific files/patterns.
.github/workflows/ci.yml Added a new CI job for markdown links linting via linkspector.

@joshua-kim joshua-kim enabled auto-merge May 6, 2025 17:24
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: umbrelladocs/action-linkspector@a0567ce1c7c13de4a2358587492ed43cab5d0102 #v1.3.4
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to be able to check this locally without an action?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The readme here talks about how to run it locally: https://github.com/UmbrellaDocs/linkspector. I found it useful to run locally. Would we want this added as a task + nix dep?

Copy link
Contributor

Choose a reason for hiding this comment

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

Task + nix dep sounds good.

@joshua-kim joshua-kim added this pull request to the merge queue May 6, 2025
auto-merge was automatically disabled May 6, 2025 18:39

Pull Request is not mergeable

Merged via the queue into master with commit 22d9587 May 6, 2025
25 checks passed
@joshua-kim joshua-kim deleted the linkspector branch May 6, 2025 18:49
@github-project-automation github-project-automation bot moved this to Done 🎉 in avalanchego May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done 🎉
Development

Successfully merging this pull request may close these issues.

4 participants