File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change 6
6
formatter :
7
7
name : auto-formatter
8
8
runs-on : windows-latest
9
- # Because auto-commit to the branch from a forked repository will fail,
10
- # so this GHA will be triggered by PRs from the source repository only.
11
- if : github.repository == github.event.pull_request.head.repo.full_name
12
9
steps :
13
10
- name : Checkout
14
11
uses : actions/checkout@v3
18
15
python-version : 3.7
19
16
- name : Install black
20
17
run : pip install black==22.12.0
21
- - name : Format
18
+ # PRs from the forked repo will trigger format-checking only.
19
+ # Auto-commit to the branch from a forked repo will fail without
20
+ # any access tokens or permissions.
21
+ # So formatting and auto-commit will be triggered by PRs from the
22
+ # base repo only.
23
+ - if : github.repository != github.event.pull_request.head.repo.full_name
24
+ name : Check style
25
+ run : python -m black comtypes/. --check --diff --color
26
+ - if : github.repository == github.event.pull_request.head.repo.full_name
27
+ name : Format
22
28
run : python -m black comtypes/.
23
- - name : Auto-commit
29
+ - if : github.repository == github.event.pull_request.head.repo.full_name
30
+ name : Auto-commit
24
31
uses : stefanzweifel/git-auto-commit-action@v4
25
32
with :
26
33
branch : ${{ github.head_ref }}
You can’t perform that action at this time.
0 commit comments