Skip to content
This repository was archived by the owner on Aug 13, 2024. It is now read-only.

Commit 7090083

Browse files
committed
GitHub Terraform: Create/Update .pre-commit-config.yaml
1 parent fd9d4a6 commit 7090083

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.pre-commit-config.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#####################################
2+
# DO NOT EDIT DIRECTLY. #
3+
# This file is managed by Terraform #
4+
#####################################
5+
6+
# There are many pre-built hooks that can be added.
7+
# You can see the list here: https://pre-commit.com/hooks.html
8+
# Adding a hook to this list will add it to all repos.
9+
# If you would like to add a hook to a single repo,
10+
# you can create a .pre-commit-config.local.yaml.
11+
# It has the same format as this file.
12+
repos:
13+
- repo: https://github.com/zricethezav/gitleaks
14+
rev: v8.15.0 # The GitHub action uses `latest` but that isn't supported here
15+
hooks:
16+
- id: gitleaks
17+
- repo: local
18+
hooks:
19+
- id: per-repo-hooks
20+
name: Repo-specific Hooks
21+
# We add an extra argument because pre-commit chops off an argument. The
22+
# dummy argument at the end ensures that "$@" actually contains all files
23+
# that were changed in the commit.
24+
entry: bash -c 'if [[ -f .pre-commit-config.local.yaml ]]; then pre-commit run --config=.pre-commit-config.local.yaml --files "$@"; fi' 'shifter'
25+
language: system

0 commit comments

Comments
 (0)