Skip to content

SARC-MedIQ/pre-commit-hooks

Repository files navigation

build status pre-commit.ci status

pre-commit-hooks

Some out-of-the-box hooks for pre-commit.

See also: https://github.com/pre-commit/pre-commit

Using pre-commit-hooks with pre-commit

Add this to your .pre-commit-config.yaml

-   repo: https://github.com/SARC-MedIQ/pre-commit-hooks
    rev: 1.0.0  # Use the ref you want to point at
    hooks:
    -   id: check-branch-name

Hooks available

check-branch-name

Check the branch name meets the format requirements

  • -p, --pattern - Provide pattern the branch must match (default [a-z]{2,5)-\d+-[a-z0-9-]+), can be used multiple times

Note that check-branch-name is configured by default to always_run. As a result, it will ignore any setting of files, exclude, types or exclude_types. Set always_run: false to allow this hook to be skipped according to these file filters. Caveat: In this configuration, empty commits (git commit --allow-empty) would always be allowed by this hook.

About

pre-commit hooks

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages