Skip to content
Merged
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
15 changes: 9 additions & 6 deletions .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,16 @@ TOTAL_ERRORS=0
while read local_ref local_sha remote_ref remote_sha; do
# Get the range of commits being pushed.
if [ "$remote_sha" = "0000000000000000000000000000000000000000" ]; then
# New branch - find the latest published release tag to limit scope.
latest_release=$(git tag --list 'v*' --sort=-version:refname --merged "$local_sha" | head -1)
if [ -n "$latest_release" ]; then
# Check commits since the latest published release.
range="$latest_release..$local_sha"
# New branch: only check commits not already on the remote default branch.
default_branch=$(git symbolic-ref "refs/remotes/${remote}/HEAD" 2>/dev/null | sed "s|refs/remotes/${remote}/||")
if [ -z "$default_branch" ]; then
default_branch="main"
fi
# Verify the remote ref exists locally before using it in the range.
if git rev-parse --verify "${remote}/${default_branch}" >/dev/null 2>&1; then
range="${remote}/${default_branch}..$local_sha"
else
# No release tags found - check all commits.
# Remote ref missing (shallow clone, --single-branch, etc.), check all commits.
range="$local_sha"
fi
else
Expand Down
2 changes: 1 addition & 1 deletion packages/package-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"@socketsecurity/lib": "catalog:",
"build-infra": "workspace:*",
"handlebars": "^4.7.8"
"handlebars": "^4.7.9"
},
"engines": {
"node": ">=25.5.0"
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

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