Avoid unpinned cache action in pre-commit CI - #875
Open
dayland wants to merge 1 commit into
Open
Conversation
Run the repository-managed pre-commit installation directly so CI no longer expands the wrapper's actions/cache@v4 dependency, which violates the full-SHA action policy. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 08f0eec5-45eb-485a-b89d-d0de33568add
Sun Haoran (haoranpb)
self-requested a review
September 11, 2026 13:58
Sun Haoran (haoranpb)
approved these changes
Sep 11, 2026
Sun Haoran (haoranpb)
left a comment
Collaborator
There was a problem hiding this comment.
Great improvement, thanks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The repository now requires every external GitHub Action to be pinned to a full commit SHA. Although
pre-commit/actionitself was pinned, its composite action invokesactions/cache@v4by a mutable tag, causing both CI lint jobs to fail during workflow preparation.Run the already-installed repository dependency directly instead of using the wrapper. This preserves the same pre-commit arguments and GitHub annotation behavior without introducing a transitive unpinned action.
Summary
pre-commit/actionwrapper withuv run pre-commit runusing the wrapper's existing arguments.RUFF_OUTPUT_FORMATenvironment setting.actions/cache@v4reference blocked by repository policy.