Skip to content

Commit 1931046

Browse files
authored
Merge branch 'master' into tweak-translation-script
2 parents c7ca144 + 2fa00db commit 1931046

456 files changed

Lines changed: 5457 additions & 4229 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,25 @@ updates:
55
directory: "/"
66
schedule:
77
interval: "daily"
8+
cooldown:
9+
default-days: 7
810
commit-message:
911
prefix:
1012
# Python
1113
- package-ecosystem: "uv"
1214
directory: "/"
1315
schedule:
14-
interval: "monthly"
16+
interval: "daily"
17+
cooldown:
18+
default-days: 7
19+
commit-message:
20+
prefix:
21+
# pre-commit
22+
- package-ecosystem: "pre-commit"
23+
directory: "/"
24+
schedule:
25+
interval: "daily"
26+
cooldown:
27+
default-days: 7
1528
commit-message:
1629
prefix:
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
name: Add to Project
22

33
on:
4-
pull_request_target:
4+
pull_request_target: # zizmor: ignore[dangerous-triggers]
55
issues:
66
types:
77
- opened
88
- reopened
99

10+
permissions: {}
11+
1012
jobs:
1113
add-to-project:
1214
name: Add to project
1315
runs-on: ubuntu-latest
1416
steps:
15-
- uses: actions/[email protected]
17+
- uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2
1618
with:
1719
project-url: https://github.com/orgs/fastapi/projects/2
18-
github-token: ${{ secrets.PROJECTS_TOKEN }}
20+
github-token: ${{ secrets.PROJECTS_TOKEN }} # zizmor: ignore[secrets-outside-env]

.github/workflows/build-docs.yml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
- opened
99
- synchronize
1010

11+
permissions: {}
12+
1113
jobs:
1214
changes:
1315
runs-on: ubuntu-latest
@@ -18,9 +20,11 @@ jobs:
1820
outputs:
1921
docs: ${{ steps.filter.outputs.docs }}
2022
steps:
21-
- uses: actions/checkout@v6
23+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
24+
with:
25+
persist-credentials: false
2226
# For pull requests it's not necessary to checkout the code but for the main branch it is
23-
- uses: dorny/paths-filter@v4
27+
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
2428
id: filter
2529
with:
2630
filters: |
@@ -42,14 +46,17 @@ jobs:
4246
outputs:
4347
langs: ${{ steps.show-langs.outputs.langs }}
4448
steps:
45-
- uses: actions/checkout@v6
49+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
50+
with:
51+
persist-credentials: false
4652
- name: Set up Python
47-
uses: actions/setup-python@v6
53+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
4854
with:
4955
python-version-file: ".python-version"
5056
- name: Setup uv
51-
uses: astral-sh/setup-uv@v7
57+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
5258
with:
59+
version: "0.11.4"
5360
enable-cache: true
5461
cache-dependency-glob: |
5562
pyproject.toml
@@ -75,14 +82,17 @@ jobs:
7582
env:
7683
GITHUB_CONTEXT: ${{ toJson(github) }}
7784
run: echo "$GITHUB_CONTEXT"
78-
- uses: actions/checkout@v6
85+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
86+
with:
87+
persist-credentials: false
7988
- name: Set up Python
80-
uses: actions/setup-python@v6
89+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
8190
with:
8291
python-version-file: ".python-version"
8392
- name: Setup uv
84-
uses: astral-sh/setup-uv@v7
93+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
8594
with:
95+
version: "0.11.4"
8696
enable-cache: true
8797
cache-dependency-glob: |
8898
pyproject.toml
@@ -91,13 +101,14 @@ jobs:
91101
run: uv sync --locked --no-dev --group docs
92102
- name: Update Languages
93103
run: uv run ./scripts/docs.py update-languages
94-
- uses: actions/cache@v5
104+
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
95105
with:
96106
key: mkdocs-cards-${{ matrix.lang }}-${{ github.ref }}
97107
path: docs/${{ matrix.lang }}/.cache
98108
- name: Build Docs
99-
run: uv run ./scripts/docs.py build-lang ${{ matrix.lang }}
100-
- uses: actions/upload-artifact@v7
109+
run: | # zizmor: ignore[template-injection] - comes from trusted source
110+
uv run ./scripts/docs.py build-lang ${{ matrix.lang }}
111+
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
101112
with:
102113
name: docs-site-${{ matrix.lang }}
103114
path: ./site/**
@@ -111,7 +122,7 @@ jobs:
111122
runs-on: ubuntu-latest
112123
steps:
113124
- name: Decide whether the needed jobs succeeded or failed
114-
uses: re-actors/alls-green@release/v1
125+
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
115126
with:
116127
jobs: ${{ toJSON(needs) }}
117128
allowed-skips: build-docs

.github/workflows/contributors.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
required: false
1111
default: "false"
1212

13+
permissions: {}
14+
1315
jobs:
1416
job:
1517
if: github.repository_owner == 'fastapi'
@@ -21,14 +23,17 @@ jobs:
2123
env:
2224
GITHUB_CONTEXT: ${{ toJson(github) }}
2325
run: echo "$GITHUB_CONTEXT"
24-
- uses: actions/checkout@v6
26+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
27+
with:
28+
persist-credentials: true # Required for `git push` in `contributors.py`
2529
- name: Set up Python
26-
uses: actions/setup-python@v6
30+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2731
with:
2832
python-version-file: ".python-version"
2933
- name: Setup uv
30-
uses: astral-sh/setup-uv@v7
34+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
3135
with:
36+
version: "0.11.4"
3237
enable-cache: true
3338
cache-dependency-glob: |
3439
pyproject.toml
@@ -37,13 +42,13 @@ jobs:
3742
run: uv sync --locked --no-dev --group github-actions
3843
# Allow debugging with tmate
3944
- name: Setup tmate session
40-
uses: mxschmitt/action-tmate@v3
45+
uses: mxschmitt/action-tmate@c0afd6f790e3a5564914980036ebf83216678101 # v3.23
4146
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
4247
with:
4348
limit-access-to-actor: true
4449
env:
45-
GITHUB_TOKEN: ${{ secrets.FASTAPI_PR_TOKEN }}
50+
GITHUB_TOKEN: ${{ secrets.FASTAPI_PR_TOKEN }} # zizmor: ignore[secrets-outside-env]
4651
- name: FastAPI People Contributors
4752
run: uv run ./scripts/contributors.py
4853
env:
49-
GITHUB_TOKEN: ${{ secrets.FASTAPI_PR_TOKEN }}
54+
GITHUB_TOKEN: ${{ secrets.FASTAPI_PR_TOKEN }} # zizmor: ignore[secrets-outside-env]

.github/workflows/deploy-docs.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,38 @@
11
name: Deploy Docs
22
on:
3-
workflow_run:
3+
workflow_run: # zizmor: ignore[dangerous-triggers]
44
workflows:
55
- Build Docs
66
types:
77
- completed
88

9-
permissions:
10-
deployments: write
11-
issues: write
12-
pull-requests: write
13-
statuses: write
9+
permissions: {}
1410

1511
jobs:
1612
deploy-docs:
1713
runs-on: ubuntu-latest
14+
permissions:
15+
deployments: write
16+
issues: write
17+
pull-requests: write
18+
statuses: write
1819
steps:
1920
- name: Dump GitHub context
2021
env:
2122
GITHUB_CONTEXT: ${{ toJson(github) }}
2223
run: echo "$GITHUB_CONTEXT"
23-
- uses: actions/checkout@v6
24+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
25+
with:
26+
persist-credentials: false
2427
- name: Set up Python
25-
uses: actions/setup-python@v6
28+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2629
with:
2730
python-version-file: ".python-version"
2831
- name: Setup uv
29-
uses: astral-sh/setup-uv@v7
32+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
3033
with:
31-
enable-cache: true
32-
cache-dependency-glob: |
33-
pyproject.toml
34-
uv.lock
34+
version: "0.11.4"
35+
enable-cache: false
3536
- name: Install GitHub Actions dependencies
3637
run: uv sync --locked --no-dev --group github-actions
3738
- name: Deploy Docs Status Pending
@@ -45,7 +46,7 @@ jobs:
4546
run: |
4647
rm -rf ./site
4748
mkdir ./site
48-
- uses: actions/download-artifact@v8
49+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
4950
with:
5051
path: ./site/
5152
pattern: docs-site-*
@@ -59,10 +60,10 @@ jobs:
5960
env:
6061
PROJECT_NAME: fastapitiangolo
6162
BRANCH: ${{ ( github.event.workflow_run.head_repository.full_name == github.repository && github.event.workflow_run.head_branch == 'master' && 'main' ) || ( github.event.workflow_run.head_sha ) }}
62-
uses: cloudflare/wrangler-action@v3
63+
uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3.14.1
6364
with:
64-
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
65-
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
65+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} # zizmor: ignore[secrets-outside-env]
66+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} # zizmor: ignore[secrets-outside-env]
6667
command: pages deploy ./site --project-name=${{ env.PROJECT_NAME }} --branch=${{ env.BRANCH }}
6768
- name: Deploy Docs Status Error
6869
if: failure()

.github/workflows/detect-conflicts.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
name: "Conflict detector"
22
on:
33
push:
4-
pull_request_target:
4+
pull_request_target: # zizmor: ignore[dangerous-triggers]
55
types: [synchronize]
66

7+
permissions: {}
8+
79
jobs:
810
main:
911
permissions:
@@ -12,7 +14,7 @@ jobs:
1214
runs-on: ubuntu-latest
1315
steps:
1416
- name: Check if PRs have merge conflicts
15-
uses: eps1lon/actions-label-merge-conflict@v3
17+
uses: eps1lon/actions-label-merge-conflict@1df065ebe6e3310545d4f4c4e862e43bdca146f0 # v3.0.3
1618
with:
1719
dirtyLabel: "conflicts"
1820
repoToken: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/issue-manager.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,26 @@ on:
99
issues:
1010
types:
1111
- labeled
12-
pull_request_target:
12+
pull_request_target: # zizmor: ignore[dangerous-triggers]
1313
types:
1414
- labeled
1515
workflow_dispatch:
1616

17-
permissions:
18-
issues: write
19-
pull-requests: write
17+
permissions: {}
2018

2119
jobs:
2220
issue-manager:
2321
if: github.repository_owner == 'fastapi'
2422
runs-on: ubuntu-latest
23+
permissions:
24+
issues: write
25+
pull-requests: write
2526
steps:
2627
- name: Dump GitHub context
2728
env:
2829
GITHUB_CONTEXT: ${{ toJson(github) }}
2930
run: echo "$GITHUB_CONTEXT"
30-
- uses: tiangolo/[email protected]
31+
- uses: tiangolo/issue-manager@2fb3484ec9279485df8659e8ec73de262431737d # 0.6.0
3132
with:
3233
token: ${{ secrets.GITHUB_TOKEN }}
3334
config: >

.github/workflows/label-approved.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,30 @@ on:
55
- cron: "0 12 * * *"
66
workflow_dispatch:
77

8-
permissions:
9-
pull-requests: write
8+
permissions: {}
109

1110
jobs:
1211
label-approved:
1312
if: github.repository_owner == 'fastapi'
1413
runs-on: ubuntu-latest
14+
permissions:
15+
pull-requests: write
1516
steps:
1617
- name: Dump GitHub context
1718
env:
1819
GITHUB_CONTEXT: ${{ toJson(github) }}
1920
run: echo "$GITHUB_CONTEXT"
20-
- uses: actions/checkout@v6
21+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
22+
with:
23+
persist-credentials: false
2124
- name: Set up Python
22-
uses: actions/setup-python@v6
25+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2326
with:
2427
python-version-file: ".python-version"
2528
- name: Setup uv
26-
uses: astral-sh/setup-uv@v7
29+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
2730
with:
31+
version: "0.11.4"
2832
enable-cache: true
2933
cache-dependency-glob: |
3034
pyproject.toml

.github/workflows/labeler.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Labels
22
on:
3-
pull_request_target:
3+
pull_request_target: # zizmor: ignore[dangerous-triggers]
44
types:
55
- opened
66
- synchronize
@@ -9,14 +9,16 @@ on:
99
- labeled
1010
- unlabeled
1111

12+
permissions: {}
13+
1214
jobs:
1315
labeler:
1416
permissions:
1517
contents: read
1618
pull-requests: write
1719
runs-on: ubuntu-latest
1820
steps:
19-
- uses: actions/labeler@v6
21+
- uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
2022
if: ${{ github.event.action != 'labeled' && github.event.action != 'unlabeled' }}
2123
- run: echo "Done adding labels"
2224
# Run this after labeler applied labels
@@ -27,7 +29,7 @@ jobs:
2729
pull-requests: read
2830
runs-on: ubuntu-latest
2931
steps:
30-
- uses: docker://agilepathway/pull-request-label-checker:latest
32+
- uses: agilepathway/label-checker@c3d16ad512e7cea5961df85ff2486bb774caf3c5 # v1.6.65
3133
with:
3234
one_of: breaking,security,feature,bug,refactor,upgrade,docs,lang-all,internal
3335
repo_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)