ci: Add conventionl commit pre-commit hook

This commit is contained in:
Suren Gabrielyan
2023-02-28 16:43:04 +04:00
parent a2050ac041
commit a6817e0c7f
3 changed files with 10 additions and 1 deletions

View File

@ -26,6 +26,7 @@ jobs:
run: | run: |
pip install pre-commit pip install pre-commit
pre-commit install-hooks pre-commit install-hooks
pre-commit install --hook-type commit-msg --hook-type pre-push
- name: Run pre-commit and check for any changes - name: Run pre-commit and check for any changes
run: | run: |
echo "Commits being checked:" echo "Commits being checked:"

View File

@ -50,3 +50,9 @@ repos:
hooks: hooks:
- id: astyle_py - id: astyle_py
args: ['--style=otbs', '--attach-namespaces', '--attach-classes', '--indent=spaces=4', '--convert-tabs', '--align-pointer=name', '--align-reference=name', '--keep-one-line-statements', '--pad-header', '--pad-oper'] args: ['--style=otbs', '--attach-namespaces', '--attach-classes', '--indent=spaces=4', '--convert-tabs', '--align-pointer=name', '--align-reference=name', '--keep-one-line-statements', '--pad-header', '--pad-oper']
- repo: https://github.com/commitizen-tools/commitizen
rev: v2.42.1
hooks:
- id: commitizen
- id: commitizen-branch
stages: [push]

View File

@ -6,8 +6,10 @@ Contributions in the form of pull requests, issue reports, and feature requests
- [ ] Fork the [esp-protocols repository on GitHub](https://github.com/espressif/esp-protocols) to start making your changes. - [ ] Fork the [esp-protocols repository on GitHub](https://github.com/espressif/esp-protocols) to start making your changes.
- [ ] Install pre-commit hooks: `pip install pre-commit && pre-commit install` - [ ] Install pre-commit hooks: `pip install pre-commit && pre-commit install-hooks && pre-commit install --hook-type commit-msg --hook-type pre-push`
- [ ] Send a pull request (PR) and work with us until it gets merged and published. Contributions may need some modifications, so a few rounds of review and fixing may be necessary. - [ ] Send a pull request (PR) and work with us until it gets merged and published. Contributions may need some modifications, so a few rounds of review and fixing may be necessary.
For quick merging, the contribution should be short, and concentrated on a single feature or topic. The larger the contribution is, the longer it would take to review it and merge it. For quick merging, the contribution should be short, and concentrated on a single feature or topic. The larger the contribution is, the longer it would take to review it and merge it.
Please follow the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) rule when writing commit messages.