From 80c7f456c1653a515c391634a59e376686d4d5fe Mon Sep 17 00:00:00 2001 From: Jordan Storms Date: Mon, 4 Oct 2021 11:59:34 -0400 Subject: [PATCH] Add pre commit configuration (#96) * add pre-commit * change py to go file types for pre-commit * test * another test * allow pull_requests to trigger git workflow --- .github/.git-hooks/detect-api-keys.py | 73 +++++++++++++++++++++++++++ .github/workflows/build.yml | 2 +- .pre-commit-config.yaml | 13 +++++ 3 files changed, 87 insertions(+), 1 deletion(-) create mode 100755 .github/.git-hooks/detect-api-keys.py create mode 100644 .pre-commit-config.yaml diff --git a/.github/.git-hooks/detect-api-keys.py b/.github/.git-hooks/detect-api-keys.py new file mode 100755 index 00000000..8d4092a9 --- /dev/null +++ b/.github/.git-hooks/detect-api-keys.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python +from __future__ import print_function + +import argparse +import re +import sys + + +def detect_aws_access_key(line): + match = re.search(r"(?