Skip to content

Conversation

@Pruthvi-Parmar
Copy link

Problem

Fixes #1312

The show files command lists all bucket paths but cannot be filtered. Passing --bucket or 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 files command, mirroring the run command:

  • --bucket <bucket> - Filter by bucket type (repeatable)
  • --target-locale <code> - Filter by target locale (repeatable)
  • --file <substr> - Filter by file path pattern (repeatable)

Testing

  • All filters work independently
  • All filters work in combination
  • Repeatable pattern works correctly
  • No linter errors
  • Backward compatible

Examples

# Single filters
show files --bucket json -y
show files --target-locale es -y
show files --file messages -y

# Combined filters
show files --bucket mdx --target-locale fr --file readme -y

Implementation

Follows the same pattern as the run command in packages/cli/src/cli/cmd/run/plan.ts

Copy link
Contributor

Copilot AI left a 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.

@Pruthvi-Parmar
Copy link
Author

correct file filter matching logic

@github-actions
Copy link
Contributor

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.

@Pruthvi-Parmar
Copy link
Author

Actively working on it.. want anyone from the team to review last changes made inorder to address comments by copilot

@maxprilutskiy maxprilutskiy enabled auto-merge (squash) December 24, 2025 01:04
@maxprilutskiy
Copy link
Contributor

@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
auto-merge was automatically disabled December 24, 2025 03:57

Head branch was pushed to by a user without write access

@Pruthvi-Parmar Pruthvi-Parmar force-pushed the feat/add-show-files-filters branch from 7f4012c to 1d5e389 Compare December 24, 2025 03:57
@Pruthvi-Parmar
Copy link
Author

Hi @maxprilutskiy 👋
I’ve re-pushed the commits with verified signatures as requested.
Looks like the workflows are now awaiting maintainer approval.
Please let me know if anything else is needed from my side. Thanks!

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 filters to show files

2 participants