1- # GitHub Action that uses Black to reformat the Python code in an incoming pull request.
2- # If all Python code in the pull request is compliant with Black then this Action does nothing.
3- # Othewrwise, Black is run and its changes are committed back to the incoming pull request.
4- # https://github.com/cclauss/autoblack
1+ # GitHub Action that uses Black to reformat the Python code in an
2+ # incoming pull request. If all Python code in the pull request is
3+ # compliant with Black then this Action does nothing. Othewrwise,
4+ # Black is run and its changes are committed back to the incoming pull
5+ # request. https://github.com/cclauss/autoblack
56
6- name : isort and black check
7+ ---
8+
9+ name : black check
710on : [pull_request]
811jobs :
912 build :
@@ -16,17 +19,17 @@ jobs:
1619 python-version : 3.13
1720 - name : Install click, black and isort
1821 run : pip install 'click==8.0.4' 'black==25.1.0' 'isort==5.13.2'
19- - name : Run isort --check .
20- run : isort --check .
22+ # - name: Run isort --check .
23+ # run: isort --check .
2124 - name : Run black --check .
2225 run : black --check .
23- # - name: If needed, commit black changes to the pull request
24- # if: failure()
25- # run: |
26- # black .
27- # git config --global user.name 'autoblack'
28- # git config --global user.email 'rocky@users.noreply.github.com'
29- # git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
30- # git checkout $GITHUB_HEAD_REF
31- # git commit -am "fixup: Format Python code with Black"
32- # git push
26+ # - name: If needed, commit black changes to the pull request
27+ # if: failure()
28+ # run: |
29+ # black .
30+ # git config --global user.name 'autoblack'
31+ # git config --global user.email 'rocky@users.noreply.github.com'
32+ # git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
33+ # git checkout $GITHUB_HEAD_REF
34+ # git commit -am "fixup: Format Python code with Black"
35+ # git push
0 commit comments