From b8b0af08815f116f6d51f3173e2c2c35381b7fc1 Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Wed, 23 Oct 2024 14:47:25 +0200 Subject: [PATCH] Add pre-commit to yadm --- .bin/.gitignore | 1 + .bin/pre-commit-yadm | 4 ++++ .config/pre-commit-config.yaml | 5 +++++ 3 files changed, 10 insertions(+) create mode 100644 .bin/.gitignore create mode 100755 .bin/pre-commit-yadm create mode 100644 .config/pre-commit-config.yaml diff --git a/.bin/.gitignore b/.bin/.gitignore new file mode 100644 index 0000000..30e8834 --- /dev/null +++ b/.bin/.gitignore @@ -0,0 +1 @@ +host-mode diff --git a/.bin/pre-commit-yadm b/.bin/pre-commit-yadm new file mode 100755 index 0000000..a54b859 --- /dev/null +++ b/.bin/pre-commit-yadm @@ -0,0 +1,4 @@ +#!/usr/bin/env sh + +export GIT_DIR="$HOME/.local/share/yadm/repo.git" +pre-commit $@ -c .config/pre-commit-config.yaml diff --git a/.config/pre-commit-config.yaml b/.config/pre-commit-config.yaml new file mode 100644 index 0000000..ca511d2 --- /dev/null +++ b/.config/pre-commit-config.yaml @@ -0,0 +1,5 @@ +repos: + - repo: https://github.com/gitleaks/gitleaks + rev: v8.20.1 + hooks: + - id: gitleaks