Skip to content

Commit

Permalink
ci: Fix pre-commit hook stages
Browse files Browse the repository at this point in the history
Default to the two actually relevant hook stages ('commit' and
'merge-commit'), to avoid running some hooks multiple times if
pre-commit is installed globally.

While we're here, also remove the versioneer-specific exclusions. We
haven't been using versioneer for a while now and currently don't plan
on going back to it.
  • Loading branch information
Wuestengecko committed May 27, 2024
1 parent 3db5645 commit 7fe3a45
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# SPDX-FileCopyrightText: 2022 Copyright DB InfraGO AG and the capellambse-context-diagrams contributors
# SPDX-License-Identifier: CC0-1.0

exclude: '^(versioneer\.py|.*/_version\.py)$'
default_install_hook_types: [commit-msg, pre-commit]
default_stages: [commit, merge-commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
Expand Down

0 comments on commit 7fe3a45

Please sign in to comment.