-
Notifications
You must be signed in to change notification settings - Fork 407
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
feat(cli): Add support for multiple file exclusions and .gitingestignore file : issue #147 #150
base: main
Are you sure you want to change the base?
Conversation
… and .gitingestignore support - Added the ability to specify multiple file exclusion patterns using the `-e` option. - Introduced support for a `.gitingestignore` file to define files and directories to be excluded. - Improved command line pattern parsing to handle space-separated patterns. - Combined exclusion patterns from both command line arguments and the `.gitingestignore` file for comprehensive exclusion. - Removed the unused import 'os' to satisfy pylint checks. - Corrected docstring issues to comply with darglint requirements. - Updated documentation with clear examples illustrating the new features. These enhancements provide users with a more flexible and user-friendly way to exclude files and directories, either through command line options or by using a `.gitingestignore` file.
@cyclotruc please review this PR. |
@cyclotruc do you have any changes to suggest for this PR. |
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.
The goal for gitingest is to provide the exact same behaviour when it's accessed from the web or from the CLI
In that regard, it would be wise to apply this ignore pattern logic also when a .gitingestignore file is included is found in the repo from the web UI
@AbhiRam162105 Thank you for this contribution! I requested a change and I'll be happy to merge this PR once it's done But I want to warn you that this file might be a temporary feature, there's in fact the project to create a When this happens, we'll throw a depreciation warning when this file is used, until we finally make the move to I thought about naming this file |
Hey @cyclotruc I have made changes such that .gitingestignore file method for file exclusion works with both CLI and when it's used from the web. Now if the .gitingestignore file exists in the repository the file is parsed in both cases and exclusion the files occurs in both CLI and web. Please review the code and feel free to continue with .gitingestignore file until the .gitignore file method is in the works. |
Enhanced CLI and Web Features: Multiple File Exclusion using CLI and .gitingestignore file
Description:
This PR significantly improves the
gitingest
CLI tool by introducing three major features:1. Support for Multiple Exclusion Patterns
-e
option.gitingest -e "LICENSE README.md package.json"
2. .gitingestignore File Support
.gitingestignore
file to specify files and directories to be ignored..gitingestignore
file follows a format similar to.gitignore
:.gitingestignore
file are combined for comprehensive exclusion..gitingestignore
file in the cloned repository3. Branch Selection Support
-b/--branch
option.Changes Made:
CLI Updates:
--branch/-b
option--exclude-pattern/-e
and--include-pattern/-i
options--ignore-file
option with default value.gitingestignore
Core Functionality:
ingest
function to handle branch selectionDocumentation:
Impact:
These enhancements make the
gitingest
CLI more flexible and user-friendly by:Issue Addressed:
Usage Examples:
Note: The
.gitingestignore
file functionality works seamlessly with both gitingest cli and gitingest website, making it a versatile tool for managing file exclusions regardless of the repository location.