Debian Codegraph @

.github/workflows/autofix.yml

raw
1 name: Auto-fix
2 on:
3 push:
4 pull_request:
5 jobs:
6 style:
7 runs-on: ubuntu-latest
8 steps:
9 - uses: actions/checkout@v4
10 - name: Setup Python
11 uses: actions/setup-python@v5
12 with:
13 python-version: '3.11'
14 - name: Install Python dependencies
15 run: |
16 python -m pip install --upgrade hatch
17 - name: Fix code style
18 run: hatch run style:fix --fix-only
19 - name: Check if any edits are necessary
20 run: git diff --color --exit-code
21 - name: Apply automatic fixes using pre-commit-ci-lite
22 if: failure() && github.event_name == 'pull_request'
23 uses: pre-commit-ci/[email protected]