-
Notifications
You must be signed in to change notification settings - Fork 855
DC-5259 Added Lychee Link Checker #7192
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
base: main
Are you sure you want to change the base?
Conversation
Dangerous URL checkNo absolute URLs to prisma.io/docs found. |
WalkthroughAdds a new GitHub Actions workflow Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
Comment |
Redirect checkThis PR probably requires the following redirects to be added to static/_redirects:
|
Deploying docs with
|
Latest commit: |
19887ad
|
Status: | ✅ Deploy successful! |
Preview URL: | https://b30a377e.docs-51g.pages.dev |
Branch Preview URL: | https://dc-5259-lychee-link-checker.docs-51g.pages.dev |
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/lychee.yml (1)
2-2
: Consider adding manual and scheduled triggers.Add
workflow_dispatch
and a weeklyschedule
to catch rot outside PRs.-on: [pull_request] +on: + pull_request: + workflow_dispatch: + schedule: + - cron: '0 6 * * 1' # Mondays 06:00 UTC
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/lychee.yml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Check internal links
- GitHub Check: runner / linkspector
- GitHub Check: Cloudflare Pages
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.
Actionable comments posted: 0
♻️ Duplicate comments (1)
.github/workflows/lychee.yml (1)
18-23
: Lychee configuration is incomplete; missing output handling and action steps to surface results.The lychee action step (lines 13-18) is missing critical configuration that prevents broken links from being properly tracked:
- Missing output configuration: No
format
oroutput
specified, so lychee won't produce the report file needed for result tracking- Missing token: No
token
configured; adding${{ secrets.GITHUB_TOKEN }}
improves rate limits on GitHub links- No issue creation or failure steps: The permissions already grant
issues: write
(as noted in the comment), suggesting these steps were intended but are missing- Missing error handling: No
continue-on-error
or downstream steps to fail the workflow when broken links are foundThe workflow currently runs lychee with
fail: false
and no output file, meaning broken links are silently ignored.Add the missing configuration and steps to complete the workflow:
- name: Lychee Link Checker id: lychee uses: lycheeverse/lychee-action@v2 + continue-on-error: true with: args: --base-url dist --exclude-all-private dist fail: false + token: ${{ secrets.GITHUB_TOKEN }} + format: markdown + output: ./lychee/out.md + + - name: Create Issue From File + if: ${{ steps.lychee.outputs.exit_code != 0 && github.event.pull_request.head.repo.fork == false }} + uses: peter-evans/create-issue-from-file@v5 + with: + title: Link Checker Report + content-filepath: ./lychee/out.md + + - name: Fail workflow if broken links found + if: ${{ steps.lychee.outputs.exit_code != 0 }} + run: exit 1
🧹 Nitpick comments (1)
.github/workflows/lychee.yml (1)
25-42
: Commented Linkspector alternative can be cleaned up or kept as reference.The commented-out Linkspector workflow is complete and functional, but since the Lychee approach is being pursued, you may consider either removing it (once Lychee workflow is finalized and tested) or keeping it as documentation for a potential future alternative.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/lychee.yml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Check internal links
- GitHub Check: runner / linkspector
🔇 Additional comments (1)
.github/workflows/lychee.yml (1)
1-16
: Workflow structure and build step look good.The job setup, permissions configuration, and build step are correctly configured. The
issues: write
permission is necessary and properly included.
@CodeRabbit pause |
✅ Actions performedReviews paused. |
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.
Actionable comments posted: 3
🧹 Nitpick comments (1)
.github/workflows/lychee.yml (1)
71-73
: Use explicit expression syntax for consistency.The condition on line 72 uses shorthand syntax
if: steps.lychee.outputs.exit_code != 0
. For consistency with GitHub Actions best practices and the explicit${{ }}
syntax used elsewhere in the file, prefer the explicit expression syntax.Apply this diff:
- name: 🚫 Fail if broken links found - if: steps.lychee.outputs.exit_code != 0 + if: ${{ steps.lychee.outputs.exit_code != 0 }} run: exit ${{ steps.lychee.outputs.exit_code }}
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/lychee.yml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: runner / linkspector
@CodeRabbit pause |
✅ Actions performedReviews paused. |
@CodeRabbit resume |
✅ Actions performedReviews resumed. |
🍈 Lychee Link Check Report
📊 Results Overview
|
Summary by CodeRabbit