Skip to content

🌱 Add broken link check action #505

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

peppi-lotta
Copy link
Member

@peppi-lotta peppi-lotta commented Feb 24, 2025

Add lychee's broken link checker action. This checks all links except the ones specified in .lychee ignore. External links are checked as is. For internal .md links a corresponding file is looked for.

I have tried this workflow in my own fork. You can check the result here: https://github.com/peppi-lotta/metal3-docs/actions/runs/13492952293

fixes: #439

@metal3-io-bot metal3-io-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 24, 2025
Copy link
Member

@tuminoid tuminoid left a comment

Choose a reason for hiding this comment

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

We need to have this also enabled at PR level, but obviously it should not create issues but report in PR test.

@peppi-lotta peppi-lotta force-pushed the peppi-lotta/add-link-checker-action branch from 1a2a607 to 6c725b2 Compare February 24, 2025 08:29
@peppi-lotta peppi-lotta marked this pull request as draft February 24, 2025 08:52
@metal3-io-bot metal3-io-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 24, 2025
@peppi-lotta
Copy link
Member Author

We need to have this also enabled at PR level, but obviously it should not create issues but report in PR test.

Lychee has a workflow ready for PRs: https://lychee.cli.rs/github_action_recipes/pull-requests/

I think it actually smarter to add this workflow and the PR workflow to project-infra. These WFs are so general that we should be able to use the same here and in CAPM3, BMO and IPAM.

@tuminoid
Copy link
Member

We need to have this also enabled at PR level, but obviously it should not create issues but report in PR test.

Lychee has a workflow ready for PRs: https://lychee.cli.rs/github_action_recipes/pull-requests/

I think it actually smarter to add this workflow and the PR workflow to project-infra. These WFs are so general that we should be able to use the same here and in CAPM3, BMO and IPAM.

I agree, if lychee allows required repository specific configuration via the action configuration and/or repository specific configuration files. It would be great to have both scheduled and PR workflows all using lychee in all repos, and reusing the workflows from project-infra.

Copy link
Member

@Rozzii Rozzii left a comment

Choose a reason for hiding this comment

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

I agree too We can have the lychee as a reusable workflow.

@peppi-lotta peppi-lotta force-pushed the peppi-lotta/add-link-checker-action branch 2 times, most recently from d73a61a to 8a1a52b Compare February 26, 2025 13:13
@peppi-lotta peppi-lotta marked this pull request as ready for review February 26, 2025 13:14
@metal3-io-bot metal3-io-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 26, 2025

on:
pull_request_target:
# edited is needed here as this workflow checks for PR meta content
Copy link
Member

Choose a reason for hiding this comment

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

This is false comment here, we don't check meta for links but content.


jobs:
check-pr-links:
uses: metal3-io/project-infra/.github/workflows/pr-link-check.yml@main
Copy link
Member

Choose a reason for hiding this comment

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

Missing EOL

@@ -0,0 +1,17 @@
name: Sheduled Link Check
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
name: Sheduled Link Check
name: Scheduled Link Check


jobs:
check-links:
uses: metal3-io/project-infra/.github/workflows/broken-link-check.yml@main
Copy link
Member

Choose a reason for hiding this comment

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

Missing EOL

@peppi-lotta peppi-lotta force-pushed the peppi-lotta/add-link-checker-action branch from 8a1a52b to 49c4845 Compare February 26, 2025 13:38
Copy link
Member

@lentzi90 lentzi90 left a comment

Choose a reason for hiding this comment

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

/approve
/hold
Is the project-infra stuff ready?

@metal3-io-bot metal3-io-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 6, 2025
@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lentzi90

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

The pull request process is described here

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

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 6, 2025
@tuminoid
Copy link
Member

tuminoid commented Mar 6, 2025

/approve /hold Is the project-infra stuff ready?

It is not yet. metal3-io/project-infra#966

Signed-off-by: peppi-lotta <[email protected]>
@peppi-lotta peppi-lotta force-pushed the peppi-lotta/add-link-checker-action branch from 49c4845 to aee2f7e Compare April 29, 2025 08:57
Copy link
Member

@tuminoid tuminoid left a comment

Choose a reason for hiding this comment

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

Nits.

@@ -0,0 +1,17 @@
name: Scheduled Link Check

permissions:
Copy link
Member

Choose a reason for hiding this comment

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

Move permissions below on: triggers.

@@ -0,0 +1,12 @@
name: PR Check Links

permissions:
Copy link
Member

Choose a reason for hiding this comment

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

Move permissions below on: triggers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix dead links at bmc-events.md
5 participants