Skip to content

feat: use pipx to install pre-commit if uvx is not installed#57

Merged
dwilding merged 3 commits intomainfrom
pipx-pre-commit
Dec 7, 2025
Merged

feat: use pipx to install pre-commit if uvx is not installed#57
dwilding merged 3 commits intomainfrom
pipx-pre-commit

Conversation

@dwilding
Copy link
Copy Markdown
Owner

@dwilding dwilding commented Dec 7, 2025

No description provided.

Copilot AI review requested due to automatic review settings December 7, 2025 09:48
Copy link
Copy Markdown

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 adds a fallback mechanism to install pre-commit hooks using pipx when uvx is not available. Previously, the function would silently return if uvx was not installed, leaving pre-commit hooks uninstalled.

Key changes:

  • Modified the control flow to check for uvx first, then fall back to pipx if available
  • Added pipx-based pre-commit installation logic mirroring the uvx implementation
  • Updated the pipx workflow test to verify the new pipx installation path

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/gimmegit/_cli.py Changed from early return to if-elif structure, adding pipx as fallback for pre-commit installation
.github/workflows/pipx.yaml Added assertions to verify pipx is used for pre-commit installation in the test workflow

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/gimmegit/_cli.py
@dwilding dwilding merged commit 36fba8f into main Dec 7, 2025
3 checks passed
@dwilding dwilding deleted the pipx-pre-commit branch December 7, 2025 09:53
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