Skip to content

pre-commit

Framework for managing and maintaining multi-language pre-commit hooks

Multi-language package manager for pre-commit hooks. You specify a list of hooks you want and pre-commit manages the installation and execution of any hook written in any language before every commit. pre-commit is specifically designed to not require root access. If one of your developers doesn’t have node installed but modifies a JavaScript file, pre-commit automatically handles downloading and building node to run eslint without root.

dev

https://pre-commit.com/

all

Installation

1. Add WakeMeOps repository

curl -sSL https://raw.githubusercontent.com/upciti/wakemeops/main/assets/install_repository | sudo bash

2. Install pre-commit

sudo apt install pre-commit

Snippets

FROM wakemeops/minideb:bullseye

RUN install_packages \
    pre-commit=3.5.0*

USER 1001
- name: Install dependencies
  uses: upciti/wakemeops-action@v1
  with:
    packages: |
      pre-commit=3.5.0*

Download URLs

Version SHA256 Size (KB)
3.5.0 7c042dde07dc971b438a5b37cbcadfbdf0d8e2fee4ea808226c65b6049a4673a 4789
3.4.0 d1ba1cd393d88c98fd4cf9a54ca1095f765592240ff512abb638720b69f9d06b 4821
3.3.3 5a7be7a37d4dd810e8d8afa3dfdb26070cb0d64d6c76a657841c9247351088bb 4418
3.3.2 9114e72620ea4cc704d1d8fb25c848e99d3136814443c21606823197a943590a 4394
3.3.1 dc5f7c14b0bc06146f4ea1b636314debac8f351b740b9c437acc7e94870bb946 4394
3.3.0 a5533925bd7420db32bc31a44faa7dc59ce72f2379c34722dfebfa2fc25cdb1e 4394
3.2.2 c50f58addc1e9b07e813082a53d15409487c77071af71d6514d273651fc29368 8676
3.2.1 728fdadcd45f49203615d2123dfc1c676c093c116a0dab231718ba5ce59a02d9 8675
3.2.0 c00fd3de24385278f48a5588ae22a97fb8250af66b4098f9230543add4c6b7f7 8675
3.1.1 fccbccf3099015131e81864be752a6292c0c3ddd14b783efb0566aa693555547 8678

Blueprints

Debian packages listed on this page are generated from op2deb YAML blueprints. Blueprints for pre-commit are versioned here.

Click here to see pre-commit ops2deb blueprints
https://github.com/upciti/wakemeops/blob/main/blueprints/dev/pre-commit/ops2deb.yml
name: pre-commit
matrix:
  versions:
    - 2.20.0
    - 2.21.0
    - 3.0.0
    - 3.0.1
    - 3.0.2
    - 3.0.4
    - 3.1.0
    - 3.1.1
    - 3.2.0
    - 3.2.1
    - 3.2.2
    - 3.3.0
    - 3.3.1
    - 3.3.2
    - 3.3.3
    - 3.4.0
    - 3.5.0
revision: 2
architecture: all
homepage: https://pre-commit.com/
summary: framework for managing and maintaining multi-language pre-commit hooks
description: |-
  Multi-language package manager for pre-commit hooks. You specify a list of
  hooks you want and pre-commit manages the installation and execution of any
  hook written in any language before every commit. pre-commit is specifically
  designed to not require root access. If one of your developers doesn’t have
  node installed but modifies a JavaScript file, pre-commit automatically handles
  downloading and building node to run eslint without root.
depends:
  - python3.11-build-standalone
fetch: https://github.com/pre-commit/pre-commit/releases/download/v{{version}}/pre-commit-{{version}}.pyz
install:
  - pre-commit-{{version}}.pyz:/usr/lib/pre-commit/pre-commit.pyz
  - content: |-
      #!/usr/bin/env sh
      exec /usr/lib/python-build-standalone/3.11/bin/python3 /usr/lib/pre-commit/pre-commit.pyz $@
    path: /usr/bin/pre-commit

The blueprint fetch keyword contains a URL template pointing to pre-commit releases. Downloaded files are locked in a lockfile versioned here.

Click here to see pre-commit release hashes
https://github.com/upciti/wakemeops/blob/main/blueprints/dev/pre-commit/ops2deb.lock.yml
- url: https://github.com/pre-commit/pre-commit/releases/download/v2.20.0/pre-commit-2.20.0.pyz
  sha256: 83afdec9f97cbb1d2a2fd7eae645ab732e9f7a3b60cfe499269fec03fb836c42
  timestamp: 2022-09-13 14:59:16+00:00
- url: https://github.com/pre-commit/pre-commit/releases/download/v2.21.0/pre-commit-2.21.0.pyz
  sha256: 5b222bb00db637bb41feb96fded6838338bec0ae2c4f157d5ef1ad5f5060fb6a
  timestamp: 2022-12-26 02:34:48+00:00
- url: https://github.com/pre-commit/pre-commit/releases/download/v3.0.0/pre-commit-3.0.0.pyz
  sha256: a7d9ffc50bd1f1035ce814c8aaaa4e917c20372c4bdcbf03427e1606693d952c
  timestamp: 2023-01-24 04:20:29+00:00
- url: https://github.com/pre-commit/pre-commit/releases/download/v3.0.1/pre-commit-3.0.1.pyz
  sha256: 9be99ebc729d5b98b5e39bb046145b83a2021f09ba89434dea64d8b3bb5870fc
  timestamp: 2023-01-26 19:22:49+00:00
- url: https://github.com/pre-commit/pre-commit/releases/download/v3.0.2/pre-commit-3.0.2.pyz
  sha256: c6c0e8c29a29386a6ac7c43a5878ca91c3a6a09d229c19a33ed930f475938958
  timestamp: 2023-01-30 02:34:16+00:00
- url: https://github.com/pre-commit/pre-commit/releases/download/v3.0.4/pre-commit-3.0.4.pyz
  sha256: 2ba847c08c0eab281019da2b0a334ea2fdba0bd5eb8817e0dc5acad766267856
  timestamp: 2023-02-03 19:23:40+00:00
- url: https://github.com/pre-commit/pre-commit/releases/download/v3.1.0/pre-commit-3.1.0.pyz
  sha256: 50b4680f15f38ae515a7b74a34ae59d6ee30b0385112ee52fc6653b8254df828
  timestamp: 2023-02-23 04:21:46+00:00
- url: https://github.com/pre-commit/pre-commit/releases/download/v3.1.1/pre-commit-3.1.1.pyz
  sha256: 8e2080aa64525182cb0445222106bb22f5bed179d8ea33047f93874b68828ae9
  timestamp: 2023-02-28 04:24:15+00:00
- url: https://github.com/pre-commit/pre-commit/releases/download/v3.2.0/pre-commit-3.2.0.pyz
  sha256: bed0c50a2ac4cd1209833f89b115e058d7b8bc120650cc3f69241e0b88d7cfa0
  timestamp: 2023-03-17 21:16:26+00:00
- url: https://github.com/pre-commit/pre-commit/releases/download/v3.2.1/pre-commit-3.2.1.pyz
  sha256: 1526dca6f6568b94cc992aa02bd9f096c2dbbb8745196c220b63fb81c324dce6
  timestamp: 2023-03-25 18:20:32+00:00
- url: https://github.com/pre-commit/pre-commit/releases/download/v3.2.2/pre-commit-3.2.2.pyz
  sha256: 751c8a20367fea3e9137bcbb30b4f918424d4ccaa1eca1a294a633c4207a973a
  timestamp: 2023-04-03 21:14:58+00:00
- url: https://github.com/pre-commit/pre-commit/releases/download/v3.3.0/pre-commit-3.3.0.pyz
  sha256: 54f60f7529054782223e39fd1393dfc2cce7263e29778b9b6181421c21d63c67
  timestamp: 2023-05-02 01:24:33+00:00
- url: https://github.com/pre-commit/pre-commit/releases/download/v3.3.1/pre-commit-3.3.1.pyz
  sha256: f4f020fa071c4fd626c1e43126b54aae544f59eb21dd4e16b4e9d121d9ea8312
  timestamp: 2023-05-02 18:20:54+00:00
- url: https://github.com/pre-commit/pre-commit/releases/download/v3.3.2/pre-commit-3.3.2.pyz
  sha256: 9541d6812886128fdc76cf88cca3f45bdfdfb1e763a9f95cf640ca92949bacb3
  timestamp: 2023-05-18 01:24:23+00:00
- url: https://github.com/pre-commit/pre-commit/releases/download/v3.3.3/pre-commit-3.3.3.pyz
  sha256: fd8a46bc733fb5f78eaa91dd90995af4006cfe7c7dd843dced7b9a4db2ea3131
  timestamp: 2023-06-14 01:41:07+00:00
- url: https://github.com/pre-commit/pre-commit/releases/download/v3.4.0/pre-commit-3.4.0.pyz
  sha256: 46d184649e67ee458306bb00a765ff169c9a34ffc7b3af1704b9b50013c81939
  timestamp: 2023-09-02 18:18:34+00:00
- url: https://github.com/pre-commit/pre-commit/releases/download/v3.5.0/pre-commit-3.5.0.pyz
  sha256: 631809cb10aff6f3a71e9803e75ac8cb2ab46c5eeb584151a62a2e8f11ed3a38
  timestamp: 2023-10-13 18:22:27+00:00

Badge

WakeMeOps

[![WakeMeOps](https://docs.wakemeops.com/badges/pre-commit.svg)](https://docs.wakemeops.com/packages/pre-commit)
<a href="https://docs.wakemeops.com/packages/pre-commit">
  <img src="https://docs.wakemeops.com/badges/pre-commit.svg"/>
</a>
.. image:: https://docs.wakemeops.com/badges/pre-commit.svg
:target: https://docs.wakemeops.com/packages/pre-commit