Skip to content
/ utils Public

Stop using prek-action#833

Merged
5ouma merged 1 commit intomainfrom
revert-pre-commit-prek-action
Mar 25, 2026
Merged

Stop using prek-action#833
5ouma merged 1 commit intomainfrom
revert-pre-commit-prek-action

Conversation

@5ouma
Copy link
Owner

@5ouma 5ouma commented Mar 25, 2026

It misses some features which implemented manually.

It misses some features which implemented manually.
Copilot AI review requested due to automatic review settings March 25, 2026 13:53
@github-actions github-actions bot added 🐙 GitHub Actions Common GitHub Actions updates 🚸 pre-commit Check the code with pre-commit hooks labels Mar 25, 2026
@5ouma 5ouma removed the 🐙 GitHub Actions Common GitHub Actions updates label Mar 25, 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 removes the dependency on j178/prek-action and replaces it with explicit installation/execution steps inside the composite pre-commit action, adding caching and cache cleanup to cover missing features.

Changes:

  • Install prek via a release installer script instead of using j178/prek-action.
  • Add GitHub Actions cache for ~/.cache/prek and run prek cache gc after execution.
  • Update Renovate regex management to track the new PREK_VERSION: vX.Y.Z format.

Reviewed changes

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

File Description
pre-commit/action.yml Replaces prek-action with manual install/run, adds caching and cache GC.
.github/renovate.json Updates regex to detect PREK_VERSION in the action YAML.

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

@coderabbitai
Copy link

coderabbitai bot commented Mar 25, 2026

Walkthrough

The PR updates Renovate configuration to match version strings with v prefix and refactors the pre-commit GitHub Actions workflow to use a direct prek installer with caching instead of the pinned action.

Changes

Cohort / File(s) Summary
Renovate Configuration
.github/renovate.json
Updated regex pattern in customManagers entry to capture version strings prefixed with v (changed from X.Y.Z to vX.Y.Z format) for the j178/prek dependency.
GitHub Actions Workflow
pre-commit/action.yml
Replaced pinned j178/prek-action invocation with direct curl installer. Added actions/cache step to cache ~/.cache/prek keyed by OS and config file hash. Modified prek invocation to use prek run -ac="$PREK_CONFIG" pattern. Introduced cleanup step with prek cache gc before config file removal.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Stop using prek-action' directly and clearly describes the main change—reverting from using the prek-action to a manual implementation.
Description check ✅ Passed The description relates to the changeset by explaining the rationale (missing features) for stopping use of prek-action, though it lacks specific details about which features are missing.
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
  • Commit unit tests in branch revert-pre-commit-prek-action

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Warning

CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.

Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.

👉 Steps to fix this

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pre-commit/action.yml`:
- Around line 22-27: Replace the unsafe "curl | sh" in the "⚡ Install prek"
step: first curl the release artifact to a local file using the PREK_VERSION env
var, fetch the published SHA-256 checksum for that release, verify the
downloaded file's checksum (sha256sum -c or equivalent), and only then run the
installer script (sh ./prek-installer.sh); update the step that currently runs
curl -L
"https://github.com/j178/prek/releases/download/$PREK_VERSION/prek-installer.sh"
| sh to perform download, checksum verification, and execution in three explicit
commands.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e48be694-124f-4ceb-89f7-c8ba5cf4cea1

📥 Commits

Reviewing files that changed from the base of the PR and between f7b032e and 69cadf9.

📒 Files selected for processing (2)
  • .github/renovate.json
  • pre-commit/action.yml

@5ouma
Copy link
Owner Author

5ouma commented Mar 25, 2026

@coderabbitai approve

@5ouma 5ouma merged commit 0b9a8cd into main Mar 25, 2026
9 checks passed
@5ouma 5ouma deleted the revert-pre-commit-prek-action branch March 25, 2026 13:58
@5ouma 5ouma bot mentioned this pull request Mar 25, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 25, 2026

✅ Actions performed

Comments resolved and changes approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚸 pre-commit Check the code with pre-commit hooks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants