We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4de3ea commit e2b21a5Copy full SHA for e2b21a5
.github/workflows/black.yml
@@ -32,12 +32,13 @@ jobs:
32
run: |
33
git config --local user.email "${{ github.actor }}@users.noreply.github.com"
34
git config --local user.name "${{ github.actor }}"
35
- git diff-index --quiet HEAD || git stash -u
36
- black $(git ls-files '*.py')
37
- git stash drop
38
- git add .
39
- message="$(git log -1 --pretty=%B) Format Python code with Black"
40
- git diff-index --quiet HEAD || git commit -m "$message"
+ if [ "$(git ls-files --modified '*.py' | wc -l)" -ne 0 ]; then
+ git stash -u
+ git stash drop
+ git add .
+ message="$(git log -1 --pretty=%B) Format Python code with Black"
+ git commit -m "$message"
41
+ fi
42
- name: Push changes
43
44
git push origin master
0 commit comments