Skip to content
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

Problem: linkcheck checks all links, even if unrelated to current PR #1690

Closed
eviau-artefactual opened this issue May 15, 2024 · 2 comments
Closed

Comments

@eviau-artefactual
Copy link

eviau-artefactual commented May 15, 2024

Current behavior

As it is, linkcheck outputs all outdated URLs, including those in files unrelated to the current PR.

An example of this: https://github.com/artefactual/archivematica-docs/actions/runs/9007494522/job/24747392272?pr=461#step:8:1

Expected behavior

That linkcheck outputs only links in files that were changed, and if possible, only links in actual commits.

Potential solution

A potential solution was proposed in artefactual/archivematica-docs#463 - but it might introduce too much complexity for the purpose... The best option would be to manage this at the pre-commit level, locally.

Related issue: #1689

@eviau-artefactual
Copy link
Author

eviau-artefactual commented Aug 6, 2024

After discussion, we took the decision to have linkcheck as a scheduled job instead, given that websites can go down and this mean we need to double check every test result.

I will close PRs that are not useful anymore and remove the linkcheck for now.

@eviau-artefactual
Copy link
Author

If you want to do a linkcheck for only changed files, use this instead:

pre-commit run --from-ref origin/HEAD --to-ref HEAD

closing this as we have other plans for linkcheck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant