diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..ee61962 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,15 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: 'v4.5.0' + hooks: + - id: check-merge-conflict + - id: check-toml + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace + +ci: + autofix_commit_msg: + 🚨 [pre-commit.ci] Fix errors raised by `pre-commit` hooks + autoupdate_commit_msg: + ⬆️ [pre-commit.ci] Update versions of `pre-commit` hooks diff --git a/README.md b/README.md index 701b7f5..dc5da8c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # python-gitmojis +[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?style=flat-square&logo=pre-commit)][pre-commit.ci] + ## Summary This package provides a few simple utilities to apply the official @@ -28,3 +30,4 @@ Released under the [MIT License][license]. [gitmoji-repository]: https://github.com/carloscuesta/gitmoji [gitmoji-website]: https://gitmoji.dev [license]: https://github.com/paduszyk/python-gitmojis/blob/main/LICENSE +[pre-commit.ci]: https://results.pre-commit.ci/latest/github/paduszyk/python-gitmojis/main diff --git a/pyproject.toml b/pyproject.toml index 83a52f5..1ae2635 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,6 +11,11 @@ version = "0.0.0" requires-python = ">= 3.10" dependencies = [] +[project.optional-dependencies] +dev = [ + "pre-commit", +] + [tool.setuptools.packages.find] include = ["gitmojis*"] where = ["src"]