File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,14 +26,21 @@ TOTAL_ERRORS=0
2626while read local_ref local_sha remote_ref remote_sha; do
2727 # Get the range of commits being pushed.
2828 if [ " $remote_sha " = " 0000000000000000000000000000000000000000" ]; then
29- # New branch - find the latest published release tag to limit scope.
30- latest_release=$( git tag --list ' v*' --sort=-version:refname --merged " $local_sha " | head -1)
31- if [ -n " $latest_release " ]; then
32- # Check commits since the latest published release.
33- range=" $latest_release ..$local_sha "
29+ # New branch - only check commits not on the default remote branch.
30+ default_branch=$( git symbolic-ref refs/remotes/origin/HEAD 2> /dev/null | sed ' s@^refs/remotes/origin/@@' )
31+ if [ -z " $default_branch " ]; then
32+ default_branch=" main"
33+ fi
34+ if git rev-parse " origin/$default_branch " > /dev/null 2>&1 ; then
35+ range=" origin/$default_branch ..$local_sha "
3436 else
35- # No release tags found - check all commits.
36- range=" $local_sha "
37+ # No remote default branch - fall back to release tag.
38+ latest_release=$( git tag --list ' v*' --sort=-version:refname --merged " $local_sha " | head -1)
39+ if [ -n " $latest_release " ]; then
40+ range=" $latest_release ..$local_sha "
41+ else
42+ range=" $local_sha "
43+ fi
3744 fi
3845 else
3946 # Existing branch - check new commits since remote.
Original file line number Diff line number Diff line change 6363 "@socketregistry/is-unicode-supported" : " workspace:*" ,
6464 "@socketregistry/packageurl-js" : " catalog:" ,
6565 "@socketregistry/scripts" : " file:scripts" ,
66- "@socketsecurity/lib" : " 5.11.3 " ,
66+ "@socketsecurity/lib" : " 5.11.4 " ,
6767 "@types/fs-extra" : " catalog:" ,
6868 "@types/node" : " catalog:" ,
6969 "@types/normalize-package-data" : " catalog:" ,
You can’t perform that action at this time.
0 commit comments