Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 28, 2025

Recreate PR #28: feat: add support to clone all repositories

This PR recreates the changes from the original PR #28 targeting the main branch.

Summary of Changes

This PR adds a new hoc all command that allows users to clone all repositories from the Heroes of Code organization without manual selection. It includes:

  • New CLI Command: Added All subcommand to enable non-interactive cloning of all repositories
  • Enhanced Clone Logic: Modified Clone::clone_repos to accept an is_clone_all parameter that switches between interactive multi-select and clone-all flows
  • Refactored Functions:
    • Introduced clone_all_repos helper to handle bulk repository cloning
    • Added handle_clone_result helper to centralize clone result handling and reduce code duplication
  • Documentation: Updated README.md with hoc all command usage
  • Chore: Added .idea/ to .gitignore for JetBrains IDEs

Original PR Metadata

Why This PR Is Being Opened

This PR reopens the changes from PR #28 against the main branch to ensure the feature is properly tracked and integrated into the main development branch. The original PR was merged and this recreates those changes with preserved commit history.

Files Changed

  1. .gitignore - Added .idea/ directory for JetBrains IDEs
  2. README.md - Updated documentation with new hoc all command
  3. src/cli.rs - Added new All command variant and routing logic
  4. src/clone.rs - Implemented clone-all functionality with helper functions

Review Points

  • Design Decision: The is_clone_all boolean parameter in clone_repos() maintains backward compatibility while enabling the new feature without duplicating repository fetching logic
  • Error Handling: The refactored handle_clone_result helper ensures consistent error messages across both clone modes
  • User Experience: The clone-all feature provides a non-interactive option for bulk operations, complementing the existing interactive multi-select interface

Testing

  • All existing tests pass
  • Code formatting verified with cargo fmt
  • Changes maintain backward compatibility
  • Interactive clone flow (hoc clone) remains unchanged
  • New non-interactive flow (hoc all) properly implemented

Commits Preserved from Original PR:

  1. feat: add support to clone all repositories - Core functionality
  2. fix: function name and message - Polish and refinements
Original prompt

Create a new pull request in the repository heroesofcode/heroesofcode-git that re-applies the changes from the existing PR #28 (#28 — titled: "feat: add support to clone all repositories") but target the main branch as the base. Actions required:

  • Create a new branch from the current main branch (name it something like reopen/pr-28-against-main).
  • Cherry-pick or reapply the commits/changes from the original PR feat: add support to clone all repositories #28 onto that new branch (preserve commit messages where possible).
  • Open a new pull request targeting main with a descriptive title and body. Suggested title: "Recreate: feat: add support to clone all repositories (re-open PR feat: add support to clone all repositories #28 against main)".
  • In the PR description, include:
  • Add review comments in the PR description (or as top-level review comment) calling out any important design decisions or areas to be reviewed.
  • Request review from the default maintainers or code owners (if available).

Do not include assignees. Ensure the PR explicitly targets the main branch.

Reference: original PR metadata - author: joaolfp, number: 28, state: merged. Link: #28

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@joaolfp joaolfp closed this Dec 28, 2025
Copilot AI requested a review from joaolfp December 28, 2025 18:22
@joaolfp joaolfp deleted the copilot/reopenpr-28-against-main branch December 28, 2025 18:42
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.

2 participants