pre-commit ci

a continuous integration service for the pre-commit framework

Developers spend a fair chunk of time during their development flow on fixing relatively trivial problems in their code. pre-commit.ci both enforces that these issues are discovered (which is opt-in for each developer's workflow via pre-commit) but also fixes the issues automatically, letting developers focus their time on more valuable problems.
Sign In With GitHub

features


supported hosting platforms: currently only GitHub is supported, more to come in the future!

configuration: zero configuration setup -- nothing is needed beyond the .pre-commit-config.yaml file you already have!

auto fixing pull requests: if tools make changes to files during a pull request, pre-commit.ci will automatically fix the pull request.

pre-commit.ci will run on all pull request commits, but will not push for commits made by bots.

pre-commit.ci auto fixing a pull request

speed: much faster than comparable, free CI systems

chart comparing CI speeds

caching: tool caching is baked in and shared across all users. this means that the more users there are of pre-commit.ci, the more likely you will get faster builds!

pre-commit.ci build output

automatic updates: pre-commit.ci will periodically autoupdate your configuration ensuring that your hook versions are kept up to date. this autoupdate is currently scheduled weekly at approximately 18:00 UTC Monday.

here is an example autoupdate pull request.

pre-commit.ci auto updating a repository

re-running a pull request: you can trigger a re-run on a pull request by closing and re-opening.

skipping push runs: skip a run by putting [skip ci], [ci skip], [skip pre-commit.ci], or [pre-commit.ci skip] in the commit message.

configuration

pre-commit.ci is configured in .pre-commit-config.yaml in the ci: section.

skip

(optional, default: []) a list of hook ids to skip only in pre-commit.ci

for example:

ci:
    skip: [pylint]

repos:
-   repo: local
    hooks:
    -   id: pylint
        # ...

this is equivalent to running SKIP=pylint pre-commit ...

submodules

(optional, default: false) whether to recursive check out submodules

following the development


sponsoring


if you'd like to support the development there are two ways to sponsor: