Skip to content

Freeze all pre-commit hook revisions to commit SHAs #1441

Description

@fizyk

Summary

Freeze every hook revision in .pre-commit-config.yaml to a full immutable commit SHA.

Keep the corresponding release tag in an inline # frozen: comment. Use the format produced by pre-commit autoupdate --freeze.

Rationale

Immutable revisions protect contributors from a tag being moved after the configuration is merged. The frozen release tag lets Dependabot identify and update the intended hook release.

Affected area

  • .pre-commit-config.yaml

Acceptance criteria

  • Every non-local repos[].rev value in .pre-commit-config.yaml is a full commit SHA.
  • Each frozen SHA has its corresponding release tag in an adjacent # frozen: comment.
  • Dependabot can continue to update the pre-commit ecosystem revisions.
  • The pre-commit configuration remains valid.

Backlinks


Copied from dbfixtures/pytest-mysql#858

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions