-
Notifications
You must be signed in to change notification settings - Fork 6
migrate from pre-commit to prek #789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request updates dependency specifications across two configuration files. The 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying infrahub-sdk-python with
|
| Latest commit: |
4241a53
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7a7c1c39.infrahub-sdk-python.pages.dev |
| Branch Preview URL: | https://task-8225.infrahub-sdk-python.pages.dev |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## develop #789 +/- ##
========================================
Coverage 80.36% 80.36%
========================================
Files 115 115
Lines 9865 9865
Branches 1504 1504
========================================
Hits 7928 7928
Misses 1415 1415
Partials 522 522
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.pre-commit-config.yaml:
- Line 16: Replace the outdated hook id 'ruff' with the new 'ruff-check' in the
pre-commit config: locate the hook block that references rev: v0.14.10 and
change the line "- id: ruff" to "- id: ruff-check" (leave the existing
"ruff-format" formatter hook unchanged).
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| # Ruff version. | ||
| rev: v0.11.9 | ||
| rev: v0.14.10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
ruff-pre-commit v0.14.10 release tag github
💡 Result:
ruff-pre-commit v0.14.10 exists as a GitHub release/tag in astral-sh/ruff-pre-commit (released 2025-12-18, commit 5ba58ac). [1]
Links:
Release (tag): https://github.com/astral-sh/ruff-pre-commit/releases/tag/v0.14.10
Tag (tree): https://github.com/astral-sh/ruff-pre-commit/tree/v0.14.10
Ruff notes: https://github.com/astral-sh/ruff/releases/tag/0.14.10
[1][2]
Sources: [1] https://github.com/astral-sh/ruff-pre-commit/releases/tag/v0.14.10, [2] https://github.com/astral-sh/ruff-pre-commit/tree/v0.14.10
🌐 Web query:
ruff-pre-commit breaking changes v0.11.9 to v0.14.10
💡 Result:
Between ruff-pre-commit v0.11.9 (May 9, 2025) and v0.14.10 (Dec 18, 2025), the practical breaking change in pre-commit configuration is:
- Linter hook id renamed:
ruff→ruff-check(formatter hook remainsruff-format). (github.com)
Minimal config change:
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.10
hooks:
- - id: ruff
+ - id: ruff-check
- id: ruff-formatIf you were using fixes, keep the same args (just attach them to ruff-check instead of ruff). (github.com)
Citations:
- 1: https://github.com/astral-sh/ruff-pre-commit/tree/v0.11.9
- 2: https://github.com/astral-sh/ruff-pre-commit/tree/v0.11.9
🌐 Web query:
ruff-pre-commit changelog releases
💡 Result:
- ruff-pre-commit “changelog / releases”: it’s tracked via the project’s GitHub Releases page (tags like
v0.14.14,v0.14.13, etc.). The latest shown there isv0.14.14(Jan 22), and each release points you to the corresponding Ruff release notes. [1] - Where the actual change details live: because
ruff-pre-commitis essentially a wrapper that follows Ruff versions, the substantive changelog is typically in the linked Ruff release for the same version. [1] - Docs confirmation / how you pin versions: Ruff’s docs show using
ruff-pre-commitwithrev: v0.14.14in.pre-commit-config.yaml. [2]
Sources:
[1] astral-sh/ruff-pre-commit releases page (GitHub)
[2] Ruff docs “Integrations → pre-commit”
🏁 Script executed:
cat -n .pre-commit-config.yamlRepository: opsmill/infrahub-sdk-python
Length of output: 733
Update hook id from ruff to ruff-check on line 19.
The v0.14.10 tag exists and is valid, but between v0.11.9 and v0.14.10, the linter hook id was renamed from ruff to ruff-check. Update line 19 from - id: ruff to - id: ruff-check (the formatter hook ruff-format on line 22 requires no change).
Required change
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.10
hooks:
- - id: ruff
+ - id: ruff-check
args: [--fix]
- id: ruff-format🤖 Prompt for AI Agents
In @.pre-commit-config.yaml at line 16, Replace the outdated hook id 'ruff' with
the new 'ruff-check' in the pre-commit config: locate the hook block that
references rev: v0.14.10 and change the line "- id: ruff" to "- id: ruff-check"
(leave the existing "ruff-format" formatter hook unchanged).
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.