Skip to content

Merge pull request #774 from chinapandaman/PPF-773 #306

Merge pull request #774 from chinapandaman/PPF-773

Merge pull request #774 from chinapandaman/PPF-773 #306

# https://github.com/cclauss/autoblack
name: Code Formatting
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.BLACK_ISORT_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install black/isort
run: pip install black isort
- name: If needed, commit black/isort changes to the pull request
run: |
black .
isort .
git config --global user.name 'black-isort-bot'
git config --global user.email 'bot@domain.com'
git diff --quiet && git diff --staged --quiet || git commit -am '[skip ci]: black/isort'
git push