File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 3434 $commitEndpoint=$($payload.pull_request._links.commits.href)
3535 echo "$commitEndpoint"
3636 $commits = Invoke-WebRequest -Uri "$commitEndpoint" | ConvertFrom-Json
37- bash -c "git diff --name-only HEAD HEAD ~$($commits.count)>/d/changes.txt"
37+ bash -c "git diff --name-only HEAD~$($commits.count) HEAD >/d/changes.txt"
3838
3939 - name : Run Black on top of latest commit
4040 shell : bash
@@ -45,14 +45,14 @@ jobs:
4545 content=$(</d/changes.txt)
4646 while read file
4747 do
48- if [ $(python -c "print('${file}'[-2 :])") == "py" ]
48+ if [[ ( $(python -c "print('${file}'[-3 :])") == ". py") && (-f ${file}) ] ]
4949 then
5050 black --diff $file
5151 fi
5252 done </d/changes.txt
5353 while read file
5454 do
55- if [ $(python -c "print('${file}'[-2 :])") == "py" ]
55+ if [[ ( $(python -c "print('${file}'[-3 :])") == ". py") && (-f ${file}) ] ]
5656 then
5757 black $file
5858 fi
Original file line number Diff line number Diff line change 11name : black
22on :
33 workflow_dispatch :
4- schedule :
5- - cron : " 0 0 * * *"
64
75jobs :
86 format :
You can’t perform that action at this time.
0 commit comments