File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 - ' src/datamodel_code_generator/arguments.py'
1818 - ' src/datamodel_code_generator/cli_options.py'
1919 - ' scripts/build_cli_docs.py'
20+ pull_request_target :
21+ types : [labeled]
22+ paths :
23+ - ' tests/main/**'
24+ - ' tests/test_main_kr.py'
25+ - ' src/datamodel_code_generator/arguments.py'
26+ - ' src/datamodel_code_generator/cli_options.py'
27+ - ' scripts/build_cli_docs.py'
2028
2129permissions :
2230 contents : write
2331
2432jobs :
2533 update-cli-docs :
26- if : github.event_name == 'push' || !github.event.pull_request.head.repo.fork
34+ if : |
35+ github.event_name == 'push' ||
36+ !github.event.pull_request.head.repo.fork ||
37+ github.actor == 'koxudaxi' ||
38+ github.actor == 'gaborbernat' ||
39+ github.actor == 'ilovelinux' ||
40+ (github.event_name == 'pull_request_target' && github.event.label.name == 'safe-to-fix' &&
41+ (github.event.sender.login == 'koxudaxi' ||
42+ github.event.sender.login == 'gaborbernat' ||
43+ github.event.sender.login == 'ilovelinux'))
2744 runs-on : ubuntu-latest
2845 steps :
2946 - uses : actions/checkout@v4
3047 with :
3148 fetch-depth : 0
32- ref : ${{ github.head_ref || github.ref }}
49+ ref : ${{ github.event.pull_request.head.ref || github.ref }}
50+ repository : ${{ github.event.pull_request.head.repo.full_name || github.repository }}
3351 token : ${{ secrets.PAT }}
3452 - name : Install the latest version of uv
3553 uses : astral-sh/setup-uv@v5
Original file line number Diff line number Diff line change 1+ name : Lint
2+ on :
3+ push :
4+ branches : [main]
5+ pull_request :
6+ pull_request_target :
7+ types : [labeled]
8+
9+ jobs :
10+ lint :
11+ if : |
12+ github.event_name == 'push' ||
13+ github.event_name == 'pull_request' ||
14+ (github.event_name == 'pull_request_target' && github.event.label.name == 'safe-to-fix' &&
15+ (github.event.sender.login == 'koxudaxi' ||
16+ github.event.sender.login == 'gaborbernat' ||
17+ github.event.sender.login == 'ilovelinux'))
18+ runs-on : ubuntu-latest
19+ steps :
20+ - uses : actions/checkout@v4
21+ with :
22+ token : ${{ secrets.PAT || github.token }}
23+ ref : ${{ github.event.pull_request.head.ref || github.ref }}
24+ repository : ${{ github.event.pull_request.head.repo.full_name || github.repository }}
25+ - uses : astral-sh/setup-uv@v5
26+ - uses : actions/setup-python@v5
27+ with :
28+ python-version : " 3.14"
29+ - run : uvx prek run --all-files --show-diff-on-failure --skip readme
30+ - if : |
31+ github.event_name == 'push' ||
32+ github.event.pull_request.head.repo.full_name == github.repository ||
33+ github.actor == 'koxudaxi' ||
34+ github.actor == 'gaborbernat' ||
35+ github.actor == 'ilovelinux' ||
36+ (github.event_name == 'pull_request_target' && github.event.label.name == 'safe-to-fix' &&
37+ (github.event.sender.login == 'koxudaxi' ||
38+ github.event.sender.login == 'gaborbernat' ||
39+ github.event.sender.login == 'ilovelinux'))
40+ uses: stefanzweifel/git-auto-commit-action@v5
41+ with:
42+ commit_message: "style: auto-fix by prek"
Original file line number Diff line number Diff line change 99 branches : [main]
1010 paths :
1111 - ' src/datamodel_code_generator/**'
12+ pull_request_target :
13+ types : [labeled]
14+ paths :
15+ - ' src/datamodel_code_generator/**'
1216
1317permissions :
1418 contents : write
1519
1620jobs :
1721 update-readme :
18- if : github.event_name == 'push' || !github.event.pull_request.head.repo.fork
22+ if : |
23+ github.event_name == 'push' ||
24+ !github.event.pull_request.head.repo.fork ||
25+ github.actor == 'koxudaxi' ||
26+ github.actor == 'gaborbernat' ||
27+ github.actor == 'ilovelinux' ||
28+ (github.event_name == 'pull_request_target' && github.event.label.name == 'safe-to-fix' &&
29+ (github.event.sender.login == 'koxudaxi' ||
30+ github.event.sender.login == 'gaborbernat' ||
31+ github.event.sender.login == 'ilovelinux'))
1932 runs-on : ubuntu-latest
2033 steps :
2134 - uses : actions/checkout@v4
2235 with :
2336 fetch-depth : 0
24- ref : ${{ github.head_ref || github.ref }}
37+ ref : ${{ github.event.pull_request.head.ref || github.ref }}
38+ repository : ${{ github.event.pull_request.head.repo.full_name || github.repository }}
2539 token : ${{ secrets.PAT }}
2640 - name : Install the latest version of uv
2741 uses : astral-sh/setup-uv@v5
Original file line number Diff line number Diff line change 1- ci :
2- skip : [readme]
3-
41repos :
52- repo : https://github.com/python-jsonschema/check-jsonschema
63 rev : 0.35.0
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ isort5 = [ "isort>=5,<6" ]
113113isort6 = [ " isort>=6,<7" ]
114114isort7 = [ " isort>=7,<8; python_version>='3.10'" ]
115115pydantic1 = [ " pydantic<2" ]
116- fix = [ " pre-commit-uv>=4.1.4 " ]
116+ fix = [ " prek>=0.2.22 " ]
117117pkg-meta = [ " check-wheel-contents>=0.6.1" , " twine>=6.1" , " uv>=0.5.22" ]
118118coverage = [
119119 " covdefaults>=2.3" ,
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ dependency_groups =
5858[testenv:fix]
5959description = format the code base to adhere to our styles, and complain about what we cannot do automatically
6060commands =
61- pre-commit run --all-files --show-diff-on-failure
61+ prek run --all-files --show-diff-on-failure
6262dependency_groups = fix
6363
6464[testenv:readme]
You can’t perform that action at this time.
0 commit comments