Introducing v8.0.0 changes (#701)

* Introducing v8.0.0 changes
This commit is contained in:
Zachary Rice authored and GitHub committed 2021-11-22 10:43:51 -06:00
1 parent 780fb4a8f1
commit 93f292c3df
224 files changed
+4424 -5485

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env python3
import os,sys
import subprocess
def gitleaksEnabled():
out = subprocess.getoutput("git config --bool hooks.gitleaks")
if out == "false":
return False
return True
if gitleaksEnabled():
exitCode = os.WEXITSTATUS(os.system('gitleaks protect -v --staged'))
if exitCode == 1:
print('''Warning: gitleaks has detected sensitive information in your changes.
To disable the gitleaks precommit hook run the following command:
git config hooks.gitleaks false
''')
sys.exit(1)
else:
print('gitleaks precommit disabled (enable with `git config hooks.gitleaks true`)')