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

feat link checker #351

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .eslintrc.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions .github/workflows/link-checker.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .projen/files.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions .projenrc.js

This file was deleted.

58 changes: 58 additions & 0 deletions .projenrc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { AwesomeList } from 'p6-projen-project-awesome-list';
import { JobPermission } from 'projen/lib/github/workflows-model';

const project = new AwesomeList({
author: 'Philip M. Gollucci',
authorAddress: 'pgollucci@p6m7g8.com',
defaultReleaseBranch: 'main',
devDeps: ['p6-projen-project-awesome-list@1.0.1'],
name: 'awesome-projen',
repositoryUrl: 'https://github.com/pgollucci/awesome-projen.git',
projenrcTs: true,
// deps: [], /* Runtime dependencies of this module. */
// description: undefined, /* The description is just a string that helps people understand the purpose of the package. */
// packageName: undefined, /* The "name" in package.json. */

});

const linkChecker = project.github?.addWorkflow('link-checker');
linkChecker?.on({ schedule: [{ cron: '0 0 1 * *' }], workflowDispatch: {} });
linkChecker?.addJobs({
linkchecker: {
runsOn: ['ubuntu-latest'],
name: 'Link Checker',
permissions: {
actions: JobPermission.WRITE,
contents: JobPermission.READ,
idToken: JobPermission.WRITE,
},
steps: [
{ name: 'Checkout code', uses: 'actions/checkout@v3' },
{
name: 'Check Links',
id: 'lychee',
uses: 'lycheeverse/lychee-action@v1.5.1',
with: {
args: '--verbose --max-concurrency 32 --timeout 120 --no-progress *.md',
},
},
{
name: 'Create Issue From File',
if: '${{ steps.lychee.outputs.exit_code != 0 }}',
uses: 'peter-evans/create-issue-from-file@v4',
with: {
'title': 'Link Checker Report',
'content-filepath': './lychee/out.md',
'labels': 'report, automated issue',
},
},
{
name: 'Fail if there were link errors',
if: '${{ steps.lychee.outputs.exit_code != 0 }}',
run: 'exit ${{ steps.lychee.outputs.exit_code }}',
},
],
},
});

project.synth();
1 change: 1 addition & 0 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion tsconfig.dev.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 34 additions & 2 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading