Skip to content

Conversation

@j178
Copy link
Owner

@j178 j178 commented Jul 28, 2025

Closes #257

@j178 j178 requested a review from Copilot July 28, 2025 04:15

This comment was marked as outdated.

@j178 j178 merged commit ec28f44 into master Jul 28, 2025
15 checks passed
@j178 j178 deleted the install-hooks branch July 28, 2025 05:33
@j178 j178 requested a review from Copilot July 28, 2025 05:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements the install-hooks command functionality for prefligit, allowing users to create hook environments without installing the git hook itself. The implementation separates hook environment creation from git hook installation, providing more granular control over the installation process.

  • Adds a new install-hooks command that creates hook environments without installing git hooks
  • Refactors the existing install command to support an --install-hooks flag that combines both operations
  • Updates function signatures to better distinguish between installing git hooks vs. creating hook environments

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/main.rs Adds command routing for the new InstallHooks command
src/cli/mod.rs Updates command descriptions and exports the new install_hooks function
src/cli/install.rs Implements the install_hooks function and refactors install logic to separate concerns
tests/install.rs Adds comprehensive tests for both install-hooks command and install --install-hooks flag
tests/common/mod.rs Adds test helper method and fixes environment variable reference
src/languages/python/python.rs Improves debug logging with more descriptive messages
Comments suppressed due to low confidence (3)

src/cli/install.rs:23

  • [nitpick] The parameter name install_hook_environments is inconsistent with the function name install_hooks. Consider renaming to install_hooks for consistency, or rename the function to install_hook_environments to match this parameter.
    install_hook_environments: bool,

tests/install.rs:171

  • The test configuration uses duplicate hook entries (same repo and hook ID on lines 167 and 171). This doesn't test meaningful behavior and could be confusing. Consider using different hooks or removing the duplicate to make the test more realistic.
              - id: trailing-whitespace

tests/install.rs:223

  • The test configuration uses duplicate hook entries (same repo and hook ID on lines 219 and 223). This doesn't test meaningful behavior and could be confusing. Consider using different hooks or removing the duplicate to make the test more realistic.
              - id: trailing-whitespace

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.

implement install-hooks

2 participants