vcspull
vcspull copied to clipboard
New commands: `add` and `add-from-fs`
Fixes:
- #25
- #333
Summary by Sourcery
Add new CLI commands add and add-from-fs to vcspull for managing repository configuration
New Features:
- Implement
addcommand to add a single repository to vcspull configuration - Implement
add-from-fscommand to scan and add multiple git repositories from a directory
Enhancements:
- Extend CLI parser to support new subcommands
- Improve configuration file handling with more flexible path and key management
Reviewer's Guide
This pull request introduces two new CLI subcommands, add and add-from-fs, to vcspull, enhancing its repository management capabilities. The add command is implemented in src/vcspull/cli/add.py and allows users to manually specify repository details (URL, name, target path) for addition to the YAML configuration. The add-from-fs command, housed in src/vcspull/cli/add_from_fs.py, scans a specified filesystem directory for Git repositories, automatically extracts their remote 'origin' URLs, and adds them to the configuration, optionally after user confirmation. Both functionalities are integrated into the main CLI by updating src/vcspull/cli/__init__.py to include new argument subparsers and modify the command dispatch logic. This involved refactoring create_parser to manage and return a collection of all subparsers and updating the cli function to robustly pass arguments to the respective command handlers.
File-Level Changes
| Change | Details | Files |
|---|---|---|
Implemented add command for manual repository addition to the configuration. |
|
src/vcspull/cli/add.pysrc/vcspull/cli/__init__.py |
Implemented add-from-fs command to discover local Git repositories and add them to the configuration. |
|
src/vcspull/cli/add_from_fs.pysrc/vcspull/cli/__init__.py |
Refactored CLI argument parsing and command dispatching in __init__.py. |
|
src/vcspull/cli/__init__.py |
Tips and commands
Interacting with Sourcery
- Trigger a new review: Comment
@sourcery-ai reviewon the pull request. - Continue discussions: Reply directly to Sourcery's review comments.
- Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with
@sourcery-ai issueto create an issue from it. - Generate a pull request title: Write
@sourcery-aianywhere in the pull request title to generate a title at any time. You can also comment@sourcery-ai titleon the pull request to (re-)generate the title at any time. - Generate a pull request summary: Write
@sourcery-ai summaryanywhere in the pull request body to generate a PR summary at any time exactly where you want it. You can also comment@sourcery-ai summaryon the pull request to (re-)generate the summary at any time. - Generate reviewer's guide: Comment
@sourcery-ai guideon the pull request to (re-)generate the reviewer's guide at any time. - Resolve all Sourcery comments: Comment
@sourcery-ai resolveon the pull request to resolve all Sourcery comments. Useful if you've already addressed all the comments and don't want to see them anymore. - Dismiss all Sourcery reviews: Comment
@sourcery-ai dismisson the pull request to dismiss all existing Sourcery reviews. Especially useful if you want to start fresh with a new review - don't forget to comment@sourcery-ai reviewto trigger a new review!
Customizing Your Experience
Access your dashboard to:
- Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others.
- Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
Getting Help
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.
Codecov Report
:x: Patch coverage is 78.50000% with 43 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 80.23%. Comparing base (e6d2c45) to head (e4eca51).
:warning: Report is 4 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #465 +/- ##
==========================================
+ Coverage 78.93% 80.23% +1.29%
==========================================
Files 8 9 +1
Lines 413 597 +184
Branches 85 134 +49
==========================================
+ Hits 326 479 +153
- Misses 52 67 +15
- Partials 35 51 +16
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.