File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,10 +39,30 @@ jobs:
3939 './README.md'
4040 fail : false
4141
42+ - name : Find existing broken links issue
43+ id : existing-issue
44+ if : steps.lychee.outputs.exit_code != 0
45+ uses : actions/github-script@v7
46+ with :
47+ script : |
48+ const title = 'Broken links found in documentation'
49+ const { data: issues } = await github.rest.issues.listForRepo({
50+ owner: context.repo.owner,
51+ repo: context.repo.repo,
52+ state: 'open',
53+ labels: 'documentation, automated',
54+ per_page: 100,
55+ })
56+ const existing = issues.find((issue) => !issue.pull_request && issue.title === title)
57+ if (existing) {
58+ core.setOutput('issue-number', String(existing.number))
59+ }
60+
4261 - name : Open or update issue on broken links
4362 if : steps.lychee.outputs.exit_code != 0
4463 uses : peter-evans/create-issue-from-file@v5
4564 with :
65+ issue-number : ${{ steps.existing-issue.outputs.issue-number }}
4666 title : Broken links found in documentation
4767 content-filepath : ./lychee/out.md
4868 labels : documentation, automated
Original file line number Diff line number Diff line change 1212 "optimize:images" : " node scripts/optimize-images.mjs" ,
1313 "test" : " vitest run" ,
1414 "test:watch" : " vitest" ,
15- "typecheck" : " tsc --noEmit" ,
15+ "typecheck" : " fumadocs-mdx && tsc --noEmit" ,
1616 "lint" : " eslint --cache --max-warnings 0 ." ,
1717 "lint:prettier" : " prettier --cache --check --ignore-path .gitignore --ignore-path .prettierignore ." ,
1818 "prettier" : " bun run lint:prettier --write" ,
You can’t perform that action at this time.
0 commit comments