From 7fe3a4531bf6fdf227909123a8e051d8c4d2234a Mon Sep 17 00:00:00 2001 From: Martin Lehmann Date: Mon, 27 May 2024 16:07:56 +0200 Subject: [PATCH] ci: Fix pre-commit hook stages 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. --- .pre-commit-config.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0de11f3b..cc8e6f8f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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