fix(ci): correctly skip code CI for docs-only PRs - #6800
Conversation
dorny/paths-filter treats exclusion-only patterns as matching every non-excluded path under the default "some" quantifier, so docs-only PRs still set code=true. Add an explicit "**" include and use predicate-quantifier: every in tests, type-checker, and linter. Also gate Vulnerability Scan the same way on pull_request while keeping schedule and main push runs unconditional. Co-authored-by: Rip&Tear <theCyberTech@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughChangesThe workflows now classify documentation-only and Markdown-only changes as non-code changes. Linting, tests, and type checking use stricter path filters. Vulnerability scanning detects code changes and conditionally runs ChangesWorkflow change detection
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
🟢 Ready to approve
The change is narrowly scoped to workflow filtering and uses predicate-quantifier: every + ** consistently to fix the verified exclusion-only matching behavior.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
This PR fixes CI change detection so docs-only / markdown-only pull requests don’t incorrectly trigger the full code CI matrix, by correcting how dorny/paths-filter patterns are evaluated.
Changes:
- Update
tests,type-checker, andlinterworkflows to add an explicit**include and setpredicate-quantifier: everyso exclusion patterns behave as intended for docs-only PRs. - Gate
vulnerability-scan’spip-auditjob on the same “code changed” detection forpull_request, while keepingpushtomainandscheduleruns always enabled.
File summaries
| File | Description |
|---|---|
| .github/workflows/tests.yml | Ensures docs-only/markdown-only PRs set code=false so the test matrix is skipped correctly. |
| .github/workflows/type-checker.yml | Applies the same corrected paths-filter logic to skip mypy for docs-only/markdown-only PRs. |
| .github/workflows/linter.yml | Applies the same corrected paths-filter logic to skip lint for docs-only/markdown-only PRs. |
| .github/workflows/vulnerability-scan.yml | Adds change detection and gates pip-audit on PRs while preserving scheduled/push-to-main scans. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
Summary
dorny/paths-filterwas configured with exclusion-only patterns (!docs/**,!**/*.md) and no positive include. Under the defaultsomequantifier, a bare negation matches every path that is not in the excluded set — so docs-only PRs still gotcode=trueand ran the full test/typecheck/lint matrix.Changes
'**'include andpredicate-quantifier: everyso a file must match all patterns (everything except docs and markdown).pull_request; schedule andpushtomainstill always run pip-audit.Expected behavior
codedocs/**or*.mdfalsetruetrue