feat: add --filter flag to kit list (#1091)#1096
Open
maishivamhoo123 wants to merge 2 commits intokitops-ml:mainfrom
Open
feat: add --filter flag to kit list (#1091)#1096maishivamhoo123 wants to merge 2 commits intokitops-ml:mainfrom
maishivamhoo123 wants to merge 2 commits intokitops-ml:mainfrom
Conversation
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
38a450d to
266aa3a
Compare
amisevsk
reviewed
Mar 2, 2026
Contributor
amisevsk
left a comment
There was a problem hiding this comment.
Generally looks good to me, thanks for the contribution @maishivamhoo123!
Could you just update the doc line for LayerMatches to keep it up to date?
Comment on lines
+79
to
81
| // LayerMatches determines if we should unpack a layer in a Kitfile by matching | ||
| // fields against the filters. Matching is done against path and name (if present). | ||
| // If filters is empty, we assume everything should be unpacked |
Contributor
There was a problem hiding this comment.
Doc is slightly out of date now:
Suggested change
| // LayerMatches determines if we should unpack a layer in a Kitfile by matching | |
| // fields against the filters. Matching is done against path and name (if present). | |
| // If filters is empty, we assume everything should be unpacked | |
| // LayerMatches determines if a Kitfile layer is matched by any filter by matching | |
| // fields against the filters. Matching is done against path and name (if present). | |
| // If filters is empty, we assume everything should be unpacked |
Contributor
|
I just saw that there's already an open PR for this: #1094. Since that one is first I would prefer to merge that one |
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.
Description
Added a new directory in package/lib named as filter and it have two files filter.go and filter_test.go and removed the file from pkg/lib/filesystem/unpack/filter.go. have same logic and added a new function Added a new KitfileMatches function and test for it. and updated related functions also like
listLocalKits,listRemoteKitsandlistOptions.All test have passed locally and test the functionality also.
Linked issues
#1091
issues to this PR -->
AI-Assisted Code
Signed-off-by: Shivam Kumar maishivamhoo@gmail.com