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 authored and tomassebestik committed Oct 7, 2024
1 parent 36c6c4a commit 11c2d0a
Show file tree
Hide file tree
Showing 2 changed files with 9 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]
9 changes: 8 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,14 @@ Next, run the following command to fetch the latest version (`rev:`):
pre-commit autoupdate --repo https://github.com/espressif/cz-plugin-espressif
```

If you have already set `default_install_hook_types`, then include `pre-push` in the list. Otherwise, add the following to your `.pre-commit-config.yaml` file:

```yaml
default_install_hook_types: [pre-commit, pre-push]
```

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 11c2d0a

Please sign in to comment.