Skip to content

Commit

Permalink
revert: "feat: Add gitleaks to husky precommit" (#582)
Browse files Browse the repository at this point in the history
Reverts #578

because it's causing issues when importing in docs

https://yarnpkg.com/advanced/lifecycle-scripts#postinstall
> Postinstall scripts should be avoided at all cost, as they make
installs slower and riskier. Many users will refuse to install
dependencies that have postinstall scripts. Additionally, since the
output isn't shown out of the box, using them to print a message to the
user will not work as you expect.
  • Loading branch information
paulbalaji authored Feb 13, 2025
1 parent 359bd01 commit 2575aa5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 106 deletions.
5 changes: 5 additions & 0 deletions .changeset/tame-lizards-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/registry': patch
---

Revert husky.
88 changes: 0 additions & 88 deletions .gitleaks.toml

This file was deleted.

12 changes: 0 additions & 12 deletions .husky/pre-commit
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# 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
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ Configs and artifacts for [Hyperlane Core Contract](https://docs.hyperlane.xyz/d

Address artifacts for [Warp Route](https://docs.hyperlane.xyz/docs/deploy/deploy-warp-route) token deployments.

#### Install `gitleaks`

You need `gitleaks` installed on your machine. You can download it from [official page](https://github.com/gitleaks/gitleaks) or use a package manager of your choice.

## Contributing

This registry is maintained by the core Hyperlane team but community members are encouraged to add chain and deployment information here! See the [Contribution Guide](./CONTRIBUTING.md) for more information.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@
"test:unit": "yarn build && mocha --config .mocharc.json './test/unit/*.test.ts' --exit",
"test:health": "yarn build && mocha --config .mocharc.json './test/health/*.test.ts' --exit --parallel",
"version:prepare": "yarn changeset version && yarn install --no-immutable",
"version:check": "yarn changeset status",
"postinstall": "husky install"
"version:check": "yarn changeset status"
},
"packageManager": "[email protected]"
}

0 comments on commit 2575aa5

Please sign in to comment.