feat: add --exclude-ext flag to ignore changed files by extension#11
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #10.
Summary
--exclude-extCLI flag (andexclude-extensionsaction input) that drops files from the diff by extension before any downstream logic. A docs-only change no longer fans out to packages or triggerstest_all.git diff, so it works uniformly across single-lock, multi-lock, root triggers, and--detailedmapping.md,.md,MDall normalize to.md. Only the final suffix is matched (foo.tar.gz→.gz).Test plan
normalize_extensionsandfilter_excluded_extensions(case-insensitivity, leading-dot tolerance, no-extension files preserved, last-suffix-only matching)run()-level tests for: docs-only inside a package (no affected), docs-only at.github/(notest_all), and mixed.md+.pydiff (only.pypackage affected)exclude-ext-single(single value, docs-only on a package with transitive dependents → empty) andexclude-ext-multi(comma-separated.md,.txt, mixed diff → only the.pypackage)pytest: 190 passed--exclude-ext .md→ no affected packages