Skip to content

chore(deps): bump protobuf from 6.30.2 to 6.31.1 #61

chore(deps): bump protobuf from 6.30.2 to 6.31.1

chore(deps): bump protobuf from 6.30.2 to 6.31.1 #61

name: Auto-fix Pre-commit Issues
on:
pull_request:
types: [opened, synchronize]
jobs:
auto-fix:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit and auto-fix
id: pre-commit
run: |
# Try to run pre-commit and capture exit code
if pre-commit run --all-files; then
echo "changes=false" >> $GITHUB_OUTPUT
else
echo "changes=true" >> $GITHUB_OUTPUT
fi
- name: Commit auto-fixes
if: steps.pre-commit.outputs.changes == 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "🤖 Auto-fix pre-commit issues" || exit 0
git push