mirror of
https://github.com/mkdocs/mkdocs.git
synced 2026-03-27 01:48:30 +07:00
If a pull request has applicable Ruff fixes or needs re-formatting with Black/isort, these will be automatically pushed to the pull request via https://pre-commit.ci/lite.html
Versions of these formatter tools are already pinned since commit c9cf11b941, so unexpected unrelated changes from just updating these tools will not happen.
Note that the actual pre-commit tool is not used, and there are no plans for that.
24 lines
678 B
YAML
24 lines
678 B
YAML
name: Auto-fix
|
|
on:
|
|
push:
|
|
pull_request:
|
|
jobs:
|
|
style:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
- name: Install Python dependencies
|
|
run: |
|
|
python -m pip install --upgrade hatch
|
|
- name: Fix code style
|
|
run: hatch run style:fix --fix-only
|
|
- name: Check if any edits are necessary
|
|
run: git diff --color --exit-code
|
|
- name: Apply automatic fixes using pre-commit-ci-lite
|
|
if: failure() && github.event_name == 'pull_request'
|
|
uses: pre-commit-ci/lite-action@v1.0.1
|