Skip to content

feat(code-review): honor .opencodereview exclude globs when posting#2

Merged
vanducng merged 1 commit into
mainfrom
feat/honor-exclude-globs
Jun 16, 2026
Merged

feat(code-review): honor .opencodereview exclude globs when posting#2
vanducng merged 1 commit into
mainfrom
feat/honor-exclude-globs

Conversation

@vanducng

Copy link
Copy Markdown
Contributor
  • Why: OCR has no native path exclusion (ocr review has no --exclude; the exclude field in .opencodereview/rule.json is currently a no-op — verified via ocr review --preview). A PR touching a large vendored/tracked tree gets every upstream nit posted inline, and the volume trips GitHub's secondary rate limit, flipping the check red for an infra reason rather than a code one.
  • What: the Post review comments step now reads <repo>/.opencodereview/rule.json's exclude array and drops OCR comments whose path matches any glob before posting. Adds a small glob -> RegExp helper (**, *, ?) and logs how many were excluded (no silent truncation). No rule.json / no exclude -> behavior unchanged.
  • Risks: low — additive and opt-in per repo via the already-documented exclude field; repos that do not set it are unaffected.

Tests: glob matcher unit-checked locally · Docs: inline comment · Breaking: -

…globs

OCR has no native path exclusion, so a PR touching a large vendored/tracked tree
gets every upstream nit posted (and trips GitHub's secondary rate limit).
Post-filter OCR output against the exclude globs already declared in
<repo>/.opencodereview/rule.json before posting. No rule.json / no exclude =
unchanged behavior.
@vanducng vanducng merged commit 3027fa1 into main Jun 16, 2026
@vanducng vanducng deleted the feat/honor-exclude-globs branch June 16, 2026 09:24
vanducng added a commit to vanducng/skills that referenced this pull request Jun 16, 2026
OCR has no native path exclusion, so the exclude field in rule.json was a no-op
until dataplanelabs/workflows#2 post-filters by it. Skip vendored third-party
directories; keep tracked skills themselves reviewable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant