fix: run pre-commit as Python module for pipx/uvx compatibility#60
fix: run pre-commit as Python module for pipx/uvx compatibility#60dwilding merged 5 commits intopre-commit-depfrom
Conversation
Co-authored-by: dwilding <1141260+dwilding@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
dwilding
left a comment
There was a problem hiding this comment.
The change looks good, thanks. Since we're changing the way that pre-commit is run, please can you add a CI workflow very similar to the existing pipx workflow, but called uvx. This workflow should verify that uvx gimmegit achieves the expected result.
|
@copilot The change looks good, thanks. Since we're changing the way that |
Co-authored-by: dwilding <1141260+dwilding@users.noreply.github.com>
Added uvx CI workflow in commit 0e8e228. The workflow follows the same pattern as the pipx workflow, using |
Co-authored-by: dwilding <1141260+dwilding@users.noreply.github.com>
| permissions: | ||
| contents: read |
There was a problem hiding this comment.
Isn't read the default level of permission? If so, please leave this out.
There was a problem hiding this comment.
Removed in commit 0716b44. You're correct that read is the default permission level.
Co-authored-by: dwilding <1141260+dwilding@users.noreply.github.com>
sys.executable -m pre_commitSummary
Fixed the pipx check failure and added uvx CI workflow to ensure compatibility with both package runners.
The issue occurred because when running via
pipx run, thepre-commitexecutable wasn't available in PATH. The fix usessys.executable -m pre_committo run pre-commit as a Python module, which works correctly in isolated environments.Changes
install_pre_commit()insrc/gimmegit/_cli.pyto usesys.executable -m pre_commitinstead of searching for executable.github/workflows/uvx.yamlto verify uvx compatibilityastral-sh/setup-uv@v7action to install uv/uvx before running testsSecurity Summary
All security checks passed. No vulnerabilities detected.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.