Make changes to check for broken links #4
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@jmcmurry
Closes #3
Note that there is a bit limitation to this, in that it only goes to the URL and checks the status code. If you go to a broken Zoom link, for example, this won't catch it because Zoom doesn't return the appropriate status code (it returns 200 as if everything is OK). For the specific case of Zoom, I could check the HTML on the page for the presence "Invalid meeting ID", but that is a brittle solution. They may change that warning text at some point, or even theoretically include the word "invalid" somewhere on a valid meeting page for some reason.
However, I ran this locally on the large Bridge2AI redirects, and it did seem to catch two non-existing Google docs. Just keep in mind that this is a rough check. There may be false positives/negatives. As such, I split it up as a separate workflow check, so if you see the "encode" workflow fail, that is a critical error you definitely need to fix, but if you see the "check" workflow fail, you may be able to ignore that.