File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -44,16 +44,21 @@ jobs:
44
44
name : Run pre-commit
45
45
if : github.event.action != 'closed' && github.event.pull_request.merged != true
46
46
run : |
47
- pre-commit run --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }} --show-diff-on-failure --color=always
47
+ pre-commit run --from-ref "${FROM_REF}" --to-ref "${TO_REF}" --show-diff-on-failure --color=always
48
+ env :
49
+ FROM_REF : ${{ github.event.pull_request.base.sha }}
50
+ TO_REF : ${{ github.event.pull_request.head.sha }}
48
51
- name : Commit changes
49
52
if : ${{ failure() }}
50
53
run : |-
51
54
git add -A
52
55
git config user.name "${GIT_AUTHOR_NAME}"
53
56
git config user.email "${GIT_AUTHOR_EMAIL}"
54
57
git commit -m "pre-commit fixes"
55
- git push origin HEAD:${{ github.event.pull_request.head.ref }}
58
+ git push origin " HEAD:${HEAD_REF}"
56
59
exit 1
60
+ env :
61
+ HEAD_REF : ${{ github.event.pull_request.head.ref }}
57
62
58
63
test :
59
64
strategy :
You can’t perform that action at this time.
0 commit comments