fix(pre-commit): push properly version 4

This commit is contained in:
Ashwin Bharambe 2025-07-28 13:11:56 -07:00
parent 8fa77bc93e
commit cd24aaf3aa

View file

@ -53,11 +53,17 @@ jobs:
if ! git diff --exit-code || [ -n "$(git ls-files --others --exclude-standard)" ]; then
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
# Ensure we're on the correct branch
git checkout -B ${{ github.head_ref }}
git add -A
git commit -m "Apply pre-commit fixes"
# push to the PR branch
git push origin HEAD:${{ github.head_ref }}
# Pull latest changes from the PR branch and rebase our commit on top
git pull --rebase origin ${{ github.head_ref }}
# Push to the PR branch
git push origin ${{ github.head_ref }}
echo "Pre-commit fixes committed and pushed"
else
echo "No changes to commit"