Skip to content

feat: add --exclude-ext flag to ignore changed files by extension#11

Merged
vanandrew merged 2 commits into
mainfrom
feat/exclude-extensions
Apr 29, 2026
Merged

feat: add --exclude-ext flag to ignore changed files by extension#11
vanandrew merged 2 commits into
mainfrom
feat/exclude-extensions

Conversation

@vanandrew

Copy link
Copy Markdown
Owner

Closes #10.

Summary

  • New repeatable --exclude-ext CLI flag (and exclude-extensions action input) that drops files from the diff by extension before any downstream logic. A docs-only change no longer fans out to packages or triggers test_all.
  • Filter is applied right after git diff, so it works uniformly across single-lock, multi-lock, root triggers, and --detailed mapping.
  • Extension input is forgiving: md, .md, MD all normalize to .md. Only the final suffix is matched (foo.tar.gz.gz).

Test plan

  • Unit tests for normalize_extensions and filter_excluded_extensions (case-insensitivity, leading-dot tolerance, no-extension files preserved, last-suffix-only matching)
  • CLI run()-level tests for: docs-only inside a package (no affected), docs-only at .github/ (no test_all), and mixed .md+.py diff (only .py package affected)
  • Action workflow matrix entries exclude-ext-single (single value, docs-only on a package with transitive dependents → empty) and exclude-ext-multi (comma-separated .md,.txt, mixed diff → only the .py package)
  • Local pytest: 190 passed
  • Smoke-tested the CLI on a fresh git repo: docs-only diff with --exclude-ext .md → no affected packages

Closes #10. Adds a repeatable `--exclude-ext` CLI flag and matching
`exclude-extensions` action input so that doc-only changes (e.g.
markdown) don't pull packages into the affected set or fire root
triggers. The filter runs immediately after `git diff`, so excluded
files are invisible to package mapping, root-trigger detection, and
multi-workspace routing alike.
@codecov

codecov Bot commented Apr 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.16%. Comparing base (ea7e141) to head (3191682).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #11      +/-   ##
==========================================
+ Coverage   98.08%   98.16%   +0.08%     
==========================================
  Files           6        6              
  Lines         470      491      +21     
==========================================
+ Hits          461      482      +21     
  Misses          9        9              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vanandrew vanandrew merged commit 0b8d21b into main Apr 29, 2026
43 checks passed
@vanandrew vanandrew deleted the feat/exclude-extensions branch April 29, 2026 19:24
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.

Add exclusions for certain file extensions.

1 participant