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
Make check:markdown successful for github domain checks #667
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This was referenced Dec 13, 2022
Closed
run check:markdown reports back failure status if bad links are found
MikeMcC399
force-pushed
the
fix/check-markdown
branch
from
December 13, 2022 18:03
b1bb3ca
to
69ce44e
Compare
run 3688072982 was successful There were no link check errors recorded. No more 403 errors (forbidden). The 400 and 404 errors were already removed by PR #665 This PR is now ready for review and merge. |
1 task
jaffrepaul
approved these changes
Dec 14, 2022
🎉 This PR is included in version 5.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
kodiakhq bot
added a commit
to weareinreach/InReach
that referenced
this pull request
Dec 20, 2022
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/checkout](https://togithub.com/actions/checkout) | action | digest | `7dd9e2a` -> `755da8c` | | [chromaui/action](https://togithub.com/chromaui/action) | action | digest | `0ec8cd8` -> `2440d35` | | [cypress-io/github-action](https://togithub.com/cypress-io/github-action) | action | patch | `v5.0.0` -> `v5.0.2` | | [github/codeql-action](https://togithub.com/github/codeql-action) | action | digest | `a669cc5` -> `959cbb7` | | [tinkurlab/monorepo-pr-labeler-action](https://togithub.com/tinkurlab/monorepo-pr-labeler-action) | action | patch | `4.1.2` -> `4.1.3` | --- ### Release Notes <details> <summary>cypress-io/github-action</summary> ### [`v5.0.2`](https://togithub.com/cypress-io/github-action/releases/tag/v5.0.2) [Compare Source](https://togithub.com/cypress-io/github-action/compare/v5.0.1...v5.0.2) Numerous housekeeping updates to bring this action back up to speed. \*In combination with v5.0.1, which triggered without a new dist build. 👏 Special thanks to [@​MikeMcC399](https://togithub.com/MikeMcC399) for all the diligent work! 👏 **Fix Failed Tests** - [cypress-io/github-action#643 - [cypress-io/github-action#658 - [cypress-io/github-action#660 **Update Dependencies** - [cypress-io/github-action#644 - [cypress-io/github-action#650 **Resolve Warnings** - [cypress-io/github-action#651 - [cypress-io/github-action#666 - [cypress-io/github-action#670 - [cypress-io/github-action#675 **Docs/Example Updates** - [cypress-io/github-action#665 - [cypress-io/github-action#668 **Tooling Updates:** - [cypress-io/github-action#667 - [cypress-io/github-action#677 ### [`v5.0.1`](https://togithub.com/cypress-io/github-action/releases/tag/v5.0.1) [Compare Source](https://togithub.com/cypress-io/github-action/compare/v5.0.0...v5.0.1) ##### Bug Fixes - correct .gitignore for videos and screenshots ([89e59e5](https://togithub.com/cypress-io/github-action/commit/89e59e5cfc7760513fe9e9ce4c690345d94eb27a)) </details> <details> <summary>tinkurlab/monorepo-pr-labeler-action</summary> ### [`v4.1.3`](https://togithub.com/TinkurLab/monorepo-pr-labeler-action/releases/tag/4.1.3): Monorepo PR Labeler v4.1.3 [Compare Source](https://togithub.com/tinkurlab/monorepo-pr-labeler-action/compare/4.1.2...4.1.3) Changes include: Bug fix to ignore directories starting with a dot `.` but not directories that contain a dot `.`. According to the docs, this action should ignore mono repos that begin with a dot but it currently ignores also mono repo with a dot even if it is not the first character. Thanks to [@​MoLow](https://togithub.com/MoLow) for the fix! </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/weareinreach/InReach). PR-URL: #107 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR resolves issue #664 "markdown-link-check produces wrong results and exit status"
To resolve the issue that link checking on the domain github.com results in 403 Forbidden errors, the new markdown-link-check configuration file
md-linkcheck.json
is added and it is referred to by the scriptcheck:markdown
. After adding this config file, checks on links to github.com no longer produce a 403 error.To resolve the issue that the action main.yml is successful, even when the markdown link check fails, the check:markdown script is converted to use
xargs
instead ofexec
as suggested in https://github.com/tcort/markdown-link-check#check-links-from-a-local-markdown-folder-recursive.The new check:markdown script, which is invoked by npm run check:markdown is now defined as:
Changing the script ensures that no 403 (forbidden) errors are produced for otherwise correctly working links on github.com. Also if there are genuine link errors found, then the main.yml action will show failure, which should alert to one or more links which need correcting. In the past, link check failures went (apparently) unnoticed.
Verification
Verification with bad links
When there are known bad links in
*.md
files e.g. whennpm run check:markdown
finds 400 or 404 errors for links on the branch to be tested.After main.yml has completed its run, examine the logs.
"Test on Node v14" has a red X. "Run npm run check:markdown" shows no 403 errors and completes with the message "Error: Process completed with exit code 123."
Verification with no bad links
When there are no known bad links in
*.md
files e.g. whennpm run check:markdown
finds no 400 or 404 errors for links on the branch to be tested.After main.yml has completed its run, examine the logs of main.yml.
Look for success (green tick).
Matrix build-and-test shows 3 jobs completed.
Look at details of any of Test on Node v14 / v16 / v18. Drill down into "Run npm run check:markdown" which should end with no errors and a line similar to "134 links checked."