diff --git a/bin/pre-push.sh b/bin/pre-push.sh index 0bd204d5383..024e1f21b3a 100755 --- a/bin/pre-push.sh +++ b/bin/pre-push.sh @@ -31,4 +31,8 @@ if [ $? -ne 0 ]; then exit 1 fi +# Ensure both branches are tracked or check-changelogger-use will fail. +git checkout $PROTECTED_BRANCH --quiet +git checkout $CURRENT_BRANCH --quiet + php tools/monorepo/check-changelogger-use.php $PROTECTED_BRANCH $CURRENT_BRANCH