Skip to content

Commit

Permalink
feat(pre-commit): run in pre-push stage
Browse files Browse the repository at this point in the history
  • Loading branch information
hfudev committed Oct 3, 2024
1 parent ce6a24c commit 22e3206
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
additional_dependencies:
- czespressif
require_serial: true
stages: [pre-push]
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,6 @@ To automatically keep your changelog's "Unreleased" section up to date, add the
rev: ''
hooks:
- id: update-changelog
files: ^pyproject\.toml$ # Runs only if file with version changes
```
Next, run the following command to fetch the latest version (`rev:`):
Expand All @@ -379,6 +378,10 @@ Next, run the following command to fetch the latest version (`rev:`):
pre-commit autoupdate --repo https://github.com/espressif/cz-plugin-espressif
```

This hook is using stages "pre-push". To install the hook, please add `default_install_hook_types: [pre-commit, pre-push]` to your `.pre-commit-config.yaml` file.

After installing the hook, it runs automatically before you pushing commits to the repository. It updates the changelog with the latest commits. If the push failed because of the hook, don't forget to add the updated changelog to the commit and push again.

---

## Contributing
Expand Down

0 comments on commit 22e3206

Please sign in to comment.