From 92345e5f1eba0e9b912de2292a7b6d1b5b84fd75 Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Tue, 2 Dec 2025 05:24:48 +0100 Subject: [PATCH] chore: Added pre-commit hooks --- .pre-commit-config.yaml | 28 ++++++++++++++++++++++++++++ .secretsignore | 3 +++ committed.toml | 2 ++ patches/tailscale.yaml | 4 +--- 4 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 .pre-commit-config.yaml create mode 100644 .secretsignore create mode 100644 committed.toml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..7fbd232 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,28 @@ +default_install_hook_types: [pre-commit, commit-msg] +exclude: gotk-.*.yaml +repos: + - repo: builtin + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + args: + - --allow-multiple-documents + - id: check-added-large-files + - id: check-merge-conflict + - id: check-executables-have-shebangs + + - repo: https://github.com/crate-ci/typos + rev: v1.40.0 + hooks: + - id: typos + + - repo: https://github.com/sirwart/ripsecrets + rev: v0.1.11 + hooks: + - id: ripsecrets-system + + - repo: https://github.com/crate-ci/committed + rev: v1.1.8 + hooks: + - id: committed diff --git a/.secretsignore b/.secretsignore new file mode 100644 index 0000000..a12d653 --- /dev/null +++ b/.secretsignore @@ -0,0 +1,3 @@ +_secrets.yaml +secrets.yaml +*.agekey diff --git a/committed.toml b/committed.toml new file mode 100644 index 0000000..02407f5 --- /dev/null +++ b/committed.toml @@ -0,0 +1,2 @@ +style = "conventional" +ignore_author_re = "Flux" diff --git a/patches/tailscale.yaml b/patches/tailscale.yaml index ebb9bac..b5f84bc 100644 --- a/patches/tailscale.yaml +++ b/patches/tailscale.yaml @@ -4,6 +4,4 @@ name: tailscale environment: - TS_AUTHKEY={{ config.tailscale.authKey }} - TS_EXTRA_ARGS=--login-server {{ config.tailscale.loginServer }} --advertise-tags=tag:cluster-{{ node.cluster.name }} - {% if node.advertiseRoutes %} - - TS_ROUTES={{ helper.tailscale_subnet(node.gateway, node.netmask) }} - {% endif %} + - TS_ROUTES={% if node.advertiseRoutes -%} {{ helper.tailscale_subnet(node.gateway, node.netmask) }} {%- endif %}