Skip to content
/ utils Public

Clean up pre-commit hook cache#672

Merged
5ouma merged 1 commit intomainfrom
refactor-pre-commit-gc
Jan 24, 2026
Merged

Clean up pre-commit hook cache#672
5ouma merged 1 commit intomainfrom
refactor-pre-commit-gc

Conversation

@5ouma
Copy link
Owner

@5ouma 5ouma commented Jan 24, 2026

Keep the cache minimum.

Copilot AI review requested due to automatic review settings January 24, 2026 12:41
@github-actions github-actions bot added the 🚸 pre-commit Check the code with pre-commit hooks label Jan 24, 2026
Copy link

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 cache garbage collection step to the pre-commit action to minimize cache size by removing unused hooks after execution.

Changes:

  • Added a new cleanup step that runs prek cache gc to remove unused pre-commit hooks from the cache

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

@5ouma 5ouma added the 🎉 New Feature A new feature label Jan 24, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 24, 2026

Walkthrough

The changes add a new cleanup step to the pre-commit action workflow that executes cache garbage collection after the main pre-commit run. This step always runs regardless of the outcome of prior steps.

Changes

Cohort / File(s) Summary
Workflow cleanup enhancement
pre-commit/action.yml
Added "🧹 Clean up unused hooks" step that invokes prek cache gc. Step executes unconditionally after pre-commit run to manage hook cache.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Clean up pre-commit hook cache' directly and clearly describes the main change in the changeset—adding a cleanup step that removes unused pre-commit hooks.
Description check ✅ Passed The description 'Keep the cache minimum' is related to the changeset's purpose of cleaning up hook cache, though it is quite brief.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor-pre-commit-gc

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@5ouma 5ouma merged commit 3ba1659 into main Jan 24, 2026
11 checks passed
@5ouma 5ouma deleted the refactor-pre-commit-gc branch January 24, 2026 12:47
@5ouma 5ouma bot mentioned this pull request Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎉 New Feature A new feature 🚸 pre-commit Check the code with pre-commit hooks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants