Skip to content

Conversation

@lukaszgyg
Copy link
Contributor

@lukaszgyg lukaszgyg commented Dec 12, 2025

This pull request adds support for configuring a custom directory for cloned repositories in auto-pr, allowing users (especially those managing many repositories) to avoid duplicating disk space and to use pre-existing local clones. The feature can be set via both the configuration file and a new CLI option, with clear precedence and robust error handling. The implementation includes thorough tests and updated documentation.

Custom repository directory support

  • Added a custom_repos_dir option to the config file (config.yaml) and a --repos-dir CLI flag, allowing users to specify an existing directory for cloned repositories. The CLI flag takes precedence over the config file. [1] [2] [3] [4] [5] [6]
  • Ensured that environment variables in custom_repos_dir are expanded, and provided clear error messages if referenced variables are missing.
  • Updated the initialization logic to validate that a custom directory exists (and fail with a clear error if not), while still creating the default directory if no custom one is specified.

How to test the change

  • Added comprehensive unit and integration tests to verify all aspects of the new feature, including CLI/config precedence, environment variable expansion, error handling, and default behaviors. [1] [2]

Documentation

  • Updated the README.md with clear instructions and usage examples for the new configuration options, including important notes for organizations managing many repositories.## Proposed change

Checklist

  • Tests have been added to verify that the new code works (if possible)
  • Documentation has been updated to reflect changes
  • CHANGELOG.md has been updated to reflect changes

@lukaszgyg lukaszgyg force-pushed the add-configurable-work-dir branch 2 times, most recently from 6a702f4 to e71a3d6 Compare December 12, 2025 08:16
@lukaszgyg lukaszgyg force-pushed the add-configurable-work-dir branch from 75b5b08 to 440301e Compare December 16, 2025 08:28
@lukaszgyg lukaszgyg marked this pull request as ready for review December 16, 2025 13:20
@lukaszgyg lukaszgyg requested a review from a team as a code owner December 16, 2025 13:20
@gyg-pr-tool gyg-pr-tool bot requested a review from harshal-shah December 16, 2025 13:20
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.

1 participant