Our repo for managing pre-commit hooks
check-rebase
- Check if your branch is up-to-date with the upstream.- Specify the url of the upstream repo in
args: [git://github...]
.
- Specify the url of the upstream repo in
validate-config
- Validate a package config for Packit.- Requires
bash
. - Runs the validation if there's a
packit
binary present. - Passes if
packit
is not installed; this is useful if you can't installpackit
in the CI but still want to run the hook at least locally.
- Requires
validate-config-in-container
- Validate a package config for Packit.- Uses packit image to run packit in a container.
- Requires
docker
binary to be present, which can be a problem for example in pre-commit.ci
Add this to your .pre-commit-config.yaml
- repo: https://github.com/packit/pre-commit-hooks
rev: v1.2.0
hooks:
- id: check-rebase
args: [upstream_url]
Add this to your .pre-commit-config.yaml
- repo: https://github.com/packit/pre-commit-hooks
rev: v1.2.0
hooks:
- id: validate-config
or
- repo: https://github.com/packit/pre-commit-hooks
rev: v1.2.0
hooks:
- id: validate-config-in-container