Skip to content

Commit 105399f

Browse files
committed
Fix formatting action
1 parent 97cc0f7 commit 105399f

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

.github/workflows/format.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,10 @@ jobs:
2222
run: pip install black
2323
- name: If needed, commit black changes to the pull request
2424
run: |
25-
if black --check .
26-
then
27-
black .
28-
git config --global user.name 'formatting'
29-
git config --global user.email 'mikeheddes@users.noreply.github.com'
30-
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
31-
git checkout $GITHUB_HEAD_REF
32-
git commit -am "Format Python code"
33-
git push
34-
else
35-
echo "nothing to do"
36-
fi
25+
black .
26+
git config --global user.name 'formatting'
27+
git config --global user.email 'mikeheddes@users.noreply.github.com'
28+
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
29+
git checkout $GITHUB_HEAD_REF
30+
git commit -am "Format Python code"
31+
git push

0 commit comments

Comments
 (0)