https://github.com/packit/pre-commit-hooks
Our repo for managing pre-commit hooks
https://github.com/packit/pre-commit-hooks
Last synced: 11 months ago
JSON representation
Our repo for managing pre-commit hooks
- Host: GitHub
- URL: https://github.com/packit/pre-commit-hooks
- Owner: packit
- Created: 2019-10-17T12:10:27.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-10-21T23:07:43.000Z (over 1 year ago)
- Last Synced: 2024-10-22T19:44:22.051Z (over 1 year ago)
- Language: Python
- Size: 49.8 KB
- Stars: 2
- Watchers: 6
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pre-commit-hooks
Our repo for managing pre-commit hooks
### Our 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...]`.
- `validate-config` - Validate a [package config for Packit](https://packit.dev/docs/configuration).
- 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 install `packit` in the CI but still want to run the hook at least locally.
- `validate-config-in-container` - Validate a [package config for Packit](https://packit.dev/docs/configuration).
- Uses [packit image](https://quay.io/repository/packit/packit) to run packit in a container.
- Requires `docker` binary to be present, which can be a problem for example in [pre-commit.ci](https://github.com/pre-commit-ci/issues/issues/11)
### Using check-rebase with pre-commit
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]
### Using validate-config with pre-commit
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