Skip to content

fix(migrations): update migration files #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# Run commitlint with npx (no need for install)
npx --no-install commitlint --edit $1

# Section for git-secrets
if ! command -v git-secrets &> /dev/null 2>&1
then
GIT_SECRETS_PATH=$(which git-secrets 2>/dev/null)

if [ ! -x "$GIT_SECRETS_PATH" ]; then
echo "git-secrets is not installed. Please run 'brew install git-secrets' or visit https://github.com/awslabs/git-secrets#installing-git-secrets"
exit 1
fi

echo "Using git-secrets at: $GIT_SECRETS_PATH"

# Initialise git-secrets configuration
git-secrets --register-aws > /dev/null
$GIT_SECRETS_PATH --register-aws > /dev/null

echo "Running git-secrets..."
# Scans the commit message.
git-secrets --commit_msg_hook -- "$@"
# Scans the commit message
$GIT_SECRETS_PATH --commit_msg_hook -- "$@"
23 changes: 13 additions & 10 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# Section for git-secrets
if ! command -v git-secrets &> /dev/null 2>&1
then
echo "git-secrets is not installed. Please run 'brew install git-secrets' or visit https://github.com/awslabs/git-secrets#installing-git-secrets"
exit 1
# Dynamically find where git-secrets is
GIT_SECRETS_PATH=$(which git-secrets 2>/dev/null)

if [ ! -x "$GIT_SECRETS_PATH" ]; then
echo "git-secrets is not installed or not found in PATH."
echo "Install it: https://github.com/awslabs/git-secrets#installing-git-secrets"
exit 1
fi

# Initialise git-secrets configuration
git-secrets --register-aws > /dev/null
echo "Using git-secrets at: $GIT_SECRETS_PATH"

# Register AWS patterns (safe to run multiple times)
$GIT_SECRETS_PATH --register-aws > /dev/null

echo "Running git-secrets..."
# Scans all files that are about to be committed.
git-secrets --pre_commit_hook -- "$@"
$GIT_SECRETS_PATH --pre_commit_hook -- "$@"

npm test
npm test
18 changes: 11 additions & 7 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# Run commitizen to generate conventional commits
exec < /dev/tty && npx cz --hook || true

# Section for git-secrets
if ! command -v git-secrets &> /dev/null 2>&1
then
GIT_SECRETS_PATH=$(which git-secrets 2>/dev/null)

if [ ! -x "$GIT_SECRETS_PATH" ]; then
echo "git-secrets is not installed. Please run 'brew install git-secrets' or visit https://github.com/awslabs/git-secrets#installing-git-secrets"
exit 1
fi

# Initialise git-secrets configuration
git-secrets --register-aws > /dev/null
echo "Using git-secrets at: $GIT_SECRETS_PATH"

# Register AWS secrets patterns (safe to run multiple times)
$GIT_SECRETS_PATH --register-aws > /dev/null

echo "Running git-secrets..."
# Determines if merging in a commit will introduce tainted history.
git-secrets --prepare_commit_msg_hook -- "$@"
echo "Running git-secrets (prepare-commit-msg)..."
# Scans the commit message that is being prepared (e.g., merges, rebases)
$GIT_SECRETS_PATH --prepare_commit_msg_hook -- "$@"
181 changes: 179 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading