Skip to content

Commit

Permalink
chore: fix Release pipeline (hyperlane-xyz#5447)
Browse files Browse the repository at this point in the history
### Description

chore: fix Release pipeline
- added gitleaks to precommit, but this is not installed by default on
github actions
- so skipping gitleaks checks in CI

### Drive-by changes

<!--
Are there any minor or drive-by changes also included?
-->

### Related issues

<!--
- Fixes #[issue number here]
-->

### Backward compatibility

<!--
Are these changes backward compatible? Are there any infrastructure
implications, e.g. changes that would prohibit deploying older commits
using this infra tooling?

Yes/No
-->

### Testing

<!--
What kind of testing have these changes undergone?

None/Manual/Unit Tests
-->
  • Loading branch information
paulbalaji authored Feb 12, 2025
1 parent 3bd7bf1 commit f85c8c1
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# Check for potential secrets in staged files
echo "🔍 Checking for potential secrets in staged files..."
if git diff --cached --name-only | xargs gitleaks protect --staged --verbose --redact --config .gitleaks.toml; then
echo "✅ No secrets detected"
else
echo "❌ Potential secrets detected in your changes!"
echo "Please remove any secrets, credentials, or sensitive information before committing."
exit 1
# If not in GitHub Actions, check for potential secrets in staged files
if [ "$GITHUB_ACTIONS" != "true" ]; then
echo "🔍 Checking for potential secrets in staged files..."
if git diff --cached --name-only | xargs gitleaks protect --staged --verbose --redact --config .gitleaks.toml; then
echo "✅ No secrets detected"
else
echo "❌ Potential secrets detected in your changes!"
echo "Please remove any secrets, credentials, or sensitive information before committing."
exit 1
fi
fi

yarn lint-staged
Expand Down

0 comments on commit f85c8c1

Please sign in to comment.