-
-
Notifications
You must be signed in to change notification settings - Fork 162
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
Run linkcheck on 'release' PR workflow #2332
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2332 +/- ##
==========================================
+ Coverage 98.19% 98.22% +0.02%
==========================================
Files 87 87
Lines 4052 4052
==========================================
+ Hits 3979 3980 +1
+ Misses 73 72 -1 ☔ View full report in Codecov by Sentry. |
I think you should add the details from |
@purva-thakre Yes, good idea |
@purva-thakre comment addressed, PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
You can see this in action now! https://github.com/unitaryfund/mitiq/actions/runs/8899188557/job/24437953232?pr=2338 |
Fixes #2283 as agreed in Mitiq community call on April 26, 2024.
Description
Linkcheck was disabled in #2287, because it was making every pull request (PR) build fail with false errors. Some websites (e.g., doi.org) have bot-preventive measures for which they return 4xx errors when a request is made. In this PR we ignore those websites, on the assumption that we trust their links are not going to break.
Some false errors may still occurr, so we decided to do a linkcheck pass only on 'release' PRs.
How do you detect a 'release' PR?
We check whether the word 'release' is in the PR title (case-insensitive). This will have some false positives (just like this PR itself 😝 ), but it should have no false negatives, see this search on past release PRs. On false positives we just run make linkcheck superfluously, not a big deal.
Bonus
I fixed some linkcheck warning by explicitly replacing links that have been redirected since the time they were added to our docs.
Testing
The new step was tested locally with
where
act_event.json
is a file with content