-
Notifications
You must be signed in to change notification settings - Fork 662
feat(cli): add filters to show files command(#1312) #1317
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
base: main
Are you sure you want to change the base?
feat(cli): add filters to show files command(#1312) #1317
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds filter options to the show files command to allow users to filter file paths by bucket type, target locale, and file path patterns. This addresses the issue where the command previously listed all bucket paths without filtering capabilities.
Key changes:
- Added three new filter options:
--bucket,--target-locale, and--file(all repeatable) - Implemented filtering logic for buckets, target locales, and file path patterns using substring matching and glob patterns
- Added minimatch import for glob pattern support
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
correct file filter matching logic |
|
Hey @Pruthvi-Parmar! Just checking in - are you still working on this PR? We noticed there are some comments that may need addressing. If you need more time, no problem! Just let us know. If we don't hear back within a week, we'll close this to keep the repo tidy, but you can always reopen when ready. |
|
Actively working on it.. want anyone from the team to review last changes made inorder to address comments by copilot |
|
@Pruthvi-Parmar looking good, almost there! Please enable commit signature in your account, and re-push the commits so they're signed - otherwise GitHub won't let us merge the PR due to the security settings. Thank you! https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits |
Add --bucket, --target-locale, and --file filter options to the show files command, mirroring the filtering capabilities available in the run command. Fixes lingodotdev#1312
Head branch was pushed to by a user without write access
7f4012c to
1d5e389
Compare
|
Hi @maxprilutskiy 👋 |
Problem
Fixes #1312
The
show filescommand lists all bucket paths but cannot be filtered. Passing--bucketor other filter options results in "unknown option" errors, making it difficult to inspect specific subsets of files in large repositories.Solution
Added three filter options to the
show filescommand, mirroring theruncommand:--bucket <bucket>- Filter by bucket type (repeatable)--target-locale <code>- Filter by target locale (repeatable)--file <substr>- Filter by file path pattern (repeatable)Testing
Examples
Implementation
Follows the same pattern as the
runcommand inpackages/cli/src/cli/cmd/run/plan.ts