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

ci: adding url-validator via github actions #179

Merged
merged 12 commits into from
Sep 5, 2021

Conversation

ScriptAutomate
Copy link
Contributor

@ScriptAutomate ScriptAutomate commented Sep 3, 2021

URL validator addition to the repo. This includes an auditor that runs against new PRs, and also includes all the fixes I needed to add based on broken links.

Follow-up issue, based on findings, as it would make sense to make use of a different broken-link checking tool: #183

@ScriptAutomate
Copy link
Contributor Author

ScriptAutomate commented Sep 4, 2021

Also need assistance with:

Test-related links

[./vault/dendron.dev.cook.md]
- Failed (404): https://github.com/dendronhq/dendron/blob/master/packages/engine-server/src/__tests__/enginev2.spec.ts#L652:L652
- Failed (404): https://github.com/dendronhq/dendron/blob/master/packages/plugin-core/src/test/suite-integ/RenameNoteV2.test.ts#L157:L157

[./vault/pkg.dendron-plugin.qa.test.md]
- Failed (404): https://github.com/dendronhq/dendron/blob/master/packages/plugin-core/src/test/suite-integ/RenameNoteV2.test.ts#L131:L131

[./vault/pkg.dendron-engine.qa.md]
- Failed (404): https://www.kevinslin.com/notes/09b6c659-3fe3-4a7d-98f9-47e7167cca5b.html

Cookbook: AWS Amplify examples

[./vault/dendron.guides.cook.md]
- Could not connect: https://main.d19svbygngqnpb.amplifyapp.com/

API server

[./vault/pkg.api-publish.arch.md]
- Failed (404): https://github.com/dendronhq/dendron-backend/blob/main/packages/api-publish/server/serve-lambda.ts#L10:L10

Other

[./vault/dendron.dev.api.seeds.md]
- Failed (404): https://github.com/dendronhq/dendron/blob/master/packages/seeds-core/src/base.ts#L39

Misc

Related issue:

Note: I replaced our docs link to be to the internet archive version of the page, since the page no longer looks to exist

@kevinslin
Copy link
Member

@ScriptAutomate
Copy link
Contributor Author

ScriptAutomate commented Sep 5, 2021

GitHub doesn't like all the calls this is doing against it, and brok doesn't have much support for customizing output around particular status returns. I'm going to add it to .brokignore for now so that this PR passes without the (429) status code / rate-limiting failures.

I'm going to make a follow-up issue that could enhance the URL validator approach, in the future, with some starter commands that I'd have to experiment with at a later date. This approach would allow for internal links as well as external links, and would ensure that the site can build without errors. It seemed like using blc, or other npm based tool would be more forward thinking in case anything like dendron-cli would be extended to make use of the package (or similar package).

# container
# node:14-bullseye-slim
npm install broken-link-checker
npm install serve
npm install @dendronhq/dendron-cli@latest
npm install @dendronhq/dendron-11ty@latest
npx dendron-cli buildSiteV2 --wsRoot .  --stage prod
npx serve 2>> /dev/null &
blc http://localhost:5000/notes -ro --exclude-internal > output-internal.log
blc http://localhost:5000/notes -ro --exclude-external > output-external.log

@ScriptAutomate ScriptAutomate marked this pull request as ready for review September 5, 2021 00:12
@kevinslin kevinslin merged commit bdc9786 into dendronhq:master Sep 5, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants