Skip to content

Commit

Permalink
Merge pull request #114 from GSA-TTS/batch-embedding
Browse files Browse the repository at this point in the history
Batch embedding
  • Loading branch information
jimmoffet authored Nov 15, 2024
2 parents 3907b27 + c6b4613 commit 6f01dc1
Show file tree
Hide file tree
Showing 16 changed files with 3,600 additions and 47 deletions.
9 changes: 9 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
title = "Gitleaks development"
[extend]
useDefault = true

[allowlist]
paths = [
'''.env''',
'''.secrets.baseline'''
]
26 changes: 21 additions & 5 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,29 @@ git rm -r --cached build/ >/dev/null 2>&1 || true
(while sleep 1; do printf '.'; done) &
spinner_pid=$!

echo "Scanning all commits... 30-60s 💅🥱⏳"
# Run the gitleaks command
gitleaks detect -v
echo "Scanning commit... 30-60s 💅🥱⏳"

# Exit on any error
set -e

# Ensure cleanup happens even if script fails
cleanup() {
echo "Detected secrets in staged files!"
kill $spinner_pid
}

if ! gitleaks protect --staged -v --redact; then
cleanup
exit 1
fi

if ! git diff --staged --name-only -z | xargs -0 detect-secrets-hook --baseline .secrets.baseline; then
cleanup
exit 1
fi

# Once gitleaks completes, stop the animation
kill $spinner_pid
# wait $spinner_pid 2>/dev/null

npm install
npm run format
npm run i18n:parse
Loading

0 comments on commit 6f01dc1

Please sign in to comment.