-
-
Notifications
You must be signed in to change notification settings - Fork 638
Run markdown link check only on master or when docs change #1933
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
Conversation
Optimize CI by skipping markdown link checks on PRs that don't modify documentation files. Master branch runs always ensure comprehensive link validation. - Remove paths filter from push to master (run on all pushes) - Keep paths filter on pull_request (only run when .md files change) - Maintains weekly scheduled runs and manual workflow dispatch 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
WalkthroughThe push trigger in the markdown link-checking workflow was modified to remove explicit path filters, causing all push events to trigger the workflow. The pull_request trigger maintains its existing path restrictions, creating asymmetric trigger behavior between push and PR workflows. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
💤 Files with no reviewable 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)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code Review - PR #1933SummaryThis PR optimizes CI performance by removing the ✅ Positive Aspects
🤔 Considerations & Questions1. Consistency with Repository PatternsOther workflows in this repo use
Suggestion: Consider whether it would be more consistent to use 2. CI Cost vs. Benefit Trade-offRunning markdown link checks on every master push (including code-only changes) may increase CI time unnecessarily. Questions to consider:
3. PR Description AccuracyThe PR description states:
However, the workflow YAML file IS in the paths filter on line 9: - '.github/workflows/check-markdown-links.yml'So this PR WILL trigger the check on the pull_request event. This is actually correct behavior (you want to test workflow changes), but the description seems to expect otherwise. 🎯 RecommendationsOption A: Current Approach (Run on all master pushes)Keep the PR as-is if:
Option B: Use paths-ignore (More selective)Consider this alternative if CI efficiency is important: on:
push:
branches: [master]
paths-ignore:
- 'lib/**'
- 'spec/**'
- 'packages/**'
# ... other code directoriesThis would skip the check when only code changes, but run it for docs/config changes. Option C: Hybrid ApproachKeep selective filtering but include key documentation files: on:
push:
branches: [master]
paths:
- '**.md'
- 'docs/**'
- '.github/workflows/check-markdown-links.yml'
- '.github/markdown-link-check-config.json'
- 'README.md'This is essentially the original behavior, so only choose this if the optimization isn't actually needed. 🔍 Testing & Validation✅ The change is straightforward and unlikely to cause issues Suggestion: After merging, monitor CI runs for a week to ensure:
📊 Final AssessmentCode Quality: ✅ Excellent - clean, minimal change VerdictThe change is technically sound but represents a trade-off decision between comprehensive validation and CI efficiency. Recommendation: ✅ Approve with monitoring - The approach is valid, but track CI impact and link breakage over the next few weeks to validate the optimization achieves its goals. Review generated with analysis of workflow patterns across the repository |
Summary
Changes
pathsfilter frompushevent on master branch (run on all master pushes)pathsfilter onpull_requestevent (only run when.mdfiles or workflow config changes)Impact
Testing
This PR itself should NOT trigger the markdown link check since it only modifies the workflow YAML file (which is in the paths filter), validating the conditional execution works as expected.
🤖 Generated with Claude Code
This change is
Summary by CodeRabbit