Skip to content

Update provider handling #322

Update provider handling

Update provider handling #322

Workflow file for this run

name: Pre-commit
on:
pull_request:
types: [opened, synchronize]
permissions:
contents: write # Grants write access to push changes
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full commit history
token: ${{ secrets.GITHUB_TOKEN }} # Allows pushing changes
- uses: actions/setup-python@v4
with:
python-version: "3.11" # Set a consistent Python version
- name: Install dependencies
run: pip install --upgrade pip pre-commit # Ensure latest pre-commit version
- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure || true # Run all hooks without failing
- name: Check for changes and commit
run: |
if [[ `git status --porcelain` ]]; then
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "chore: Auto-fix pre-commit issues"
git push origin HEAD:${{ github.head_ref }}
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Ensures authentication