-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: check links via linkinator #255
Conversation
utils/sf-config.js
Outdated
@@ -47,14 +47,20 @@ const PACKAGE_DEFAULTS = { | |||
files: ['src/**/*.ts', 'test/**/*.ts', 'messages/**', '**/.eslint*', '**/tsconfig.json'], | |||
output: [], | |||
}, | |||
'link-check': { | |||
command: | |||
'linkinator "./!(CHANGELOG).md" "messages/**/*.md" --markdown --retry --directory-listing --verbosity error', |
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.
different glob implementations. the command uses !
to get everything that isn't the changelog.
the files
in wireit uses the !
to exclude thing included by the previous globs.
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.
I was playing around with this a bit. We are missing some files with this current pattern. What do you think about this:
"command": "linkinator \"**/*.md\" --skip 'CHANGELOG.md|node_modules|^test|confluence.internal.salesforce.com' --markdown --retry --directory-listing --verbosity error",
This finds an additional 20 links in forcedotcom/source-deploy-retrieve
(from 50 to 70). We can add additional "skips" as we find them
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.
commit that!
I wonder if we should come up with a way to skip this if needed. Maybe with an environment variable? I am imagining this exiting on a false positives (website down) and preventing a release. You could force merge a PR but you would not have any NUTs run if the unit tests failed because of linkinator. Example GHA |
Yeah, so the GHA could read from GHA variables to skip itself? Good idea, commit that, too. |
Ok @mshanemc this is ready for you to take a look at. I made a couple more changes to this.
|
Hold up a bit on this, the env var is not working in CI. Trying a couple things. |
check markdown files for broken links
/messages
@W-14543815@