Skip to content

Commit f18b400

Browse files
authored
Merge branch 'fastapi:main' into main
2 parents 36a7601 + 9550bb9 commit f18b400

Some content is hidden

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

66 files changed

+2409
-608
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ contact_links:
44
about: Please report security vulnerabilities to [email protected]
55
- name: Question or Problem
66
about: Ask a question or ask about a problem in GitHub Discussions.
7-
url: https://github.com/tiangolo/sqlmodel/discussions/categories/questions
7+
url: https://github.com/fastapi/sqlmodel/discussions/categories/questions
88
- name: Feature Request
99
about: To suggest an idea or ask about a feature, please start with a question saying what you would like to achieve. There might be a way to do it already.
10-
url: https://github.com/tiangolo/sqlmodel/discussions/categories/questions
10+
url: https://github.com/fastapi/sqlmodel/discussions/categories/questions
1111
- name: Show and tell
1212
about: Show what you built with SQLModel or to be used with SQLModel.
13-
url: https://github.com/tiangolo/sqlmodel/discussions/categories/show-and-tell
13+
url: https://github.com/fastapi/sqlmodel/discussions/categories/show-and-tell

.github/ISSUE_TEMPLATE/privileged.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ body:
66
value: |
77
Thanks for your interest in SQLModel! 🚀
88
9-
If you are not @tiangolo or he didn't ask you directly to create an issue here, please start the conversation in a [Question in GitHub Discussions](https://github.com/tiangolo/sqlmodel/discussions/categories/questions) instead.
9+
If you are not @tiangolo or he didn't ask you directly to create an issue here, please start the conversation in a [Question in GitHub Discussions](https://github.com/fastapi/sqlmodel/discussions/categories/questions) instead.
1010
- type: checkboxes
1111
id: privileged
1212
attributes:

.github/labeler.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
docs:
2+
- all:
3+
- changed-files:
4+
- any-glob-to-any-file:
5+
- docs/**
6+
- docs_src/**
7+
- all-globs-to-all-files:
8+
- '!sqlmodel/**'
9+
- '!pyproject.toml'
10+
11+
internal:
12+
- all:
13+
- changed-files:
14+
- any-glob-to-any-file:
15+
- .github/**
16+
- scripts/**
17+
- .gitignore
18+
- .pre-commit-config.yaml
19+
- pdm_build.py
20+
- requirements*.txt
21+
- all-globs-to-all-files:
22+
- '!docs/**'
23+
- '!sqlmodel/**'
24+
- '!pyproject.toml'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Add to Project
2+
3+
on:
4+
pull_request_target:
5+
issues:
6+
types:
7+
- opened
8+
- reopened
9+
10+
jobs:
11+
add-to-project:
12+
name: Add to project
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/[email protected]
16+
with:
17+
project-url: https://github.com/orgs/fastapi/projects/2
18+
github-token: ${{ secrets.PROJECTS_TOKEN }}

.github/workflows/build-docs.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ jobs:
2828
- docs/**
2929
- docs_src/**
3030
- requirements-docs.txt
31+
- requirements-docs-insiders.txt
3132
- pyproject.toml
3233
- mkdocs.yml
3334
- mkdocs.insiders.yml
35+
- mkdocs.maybe-insiders.yml
36+
- mkdocs.no-insiders.yml
3437
- .github/workflows/build-docs.yml
3538
- .github/workflows/deploy-docs.yml
3639
@@ -53,16 +56,15 @@ jobs:
5356
id: cache
5457
with:
5558
path: ${{ env.pythonLocation }}
56-
key: ${{ runner.os }}-python-docs-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-docs.txt') }}-v01
59+
key: ${{ runner.os }}-python-docs-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-docs.txt', 'requirements-docs-insiders.txt', 'requirements-docs-tests.txt') }}-v02
5760
- name: Install docs extras
5861
if: steps.cache.outputs.cache-hit != 'true'
5962
run: pip install -r requirements-docs.txt
6063
- name: Install Material for MkDocs Insiders
6164
if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' ) && steps.cache.outputs.cache-hit != 'true'
62-
run: |
63-
pip install git+https://${{ secrets.SQLMODEL_MKDOCS_MATERIAL_INSIDERS }}@github.com/squidfunk/mkdocs-material-insiders.git
64-
pip install git+https://${{ secrets.SQLMODEL_MKDOCS_MATERIAL_INSIDERS }}@github.com/pawamoy-insiders/griffe-typing-deprecated.git
65-
pip install git+https://${{ secrets.SQLMODEL_MKDOCS_MATERIAL_INSIDERS }}@github.com/pawamoy-insiders/mkdocstrings-python.git
65+
run: pip install -r requirements-docs-insiders.txt
66+
env:
67+
TOKEN: ${{ secrets.SQLMODEL_MKDOCS_MATERIAL_INSIDERS }}
6668
- uses: actions/cache@v4
6769
with:
6870
key: mkdocs-cards-${{ github.ref }}
@@ -75,6 +77,7 @@ jobs:
7577
with:
7678
name: docs-site
7779
path: ./site/**
80+
include-hidden-files: true
7881

7982
# https://github.com/marketplace/actions/alls-green#why
8083
docs-all-green: # This job does nothing and is only used for the branch protection

.github/workflows/deploy-docs.yml

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ permissions:
1010
deployments: write
1111
issues: write
1212
pull-requests: write
13+
statuses: write
1314

1415
jobs:
1516
deploy-docs:
@@ -20,6 +21,25 @@ jobs:
2021
GITHUB_CONTEXT: ${{ toJson(github) }}
2122
run: echo "$GITHUB_CONTEXT"
2223
- uses: actions/checkout@v4
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.11"
28+
- uses: actions/cache@v4
29+
id: cache
30+
with:
31+
path: ${{ env.pythonLocation }}
32+
key: ${{ runner.os }}-python-github-actions-${{ env.pythonLocation }}-${{ hashFiles('requirements-github-actions.txt') }}-v01
33+
- name: Install GitHub Actions dependencies
34+
if: steps.cache.outputs.cache-hit != 'true'
35+
run: pip install -r requirements-github-actions.txt
36+
- name: Deploy Docs Status Pending
37+
run: python ./scripts/deploy_docs_status.py
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
41+
RUN_ID: ${{ github.run_id }}
42+
2343
- name: Clean site
2444
run: |
2545
rm -rf ./site
@@ -43,22 +63,11 @@ jobs:
4363
directory: './site'
4464
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
4565
branch: ${{ ( github.event.workflow_run.head_repository.full_name == github.repository && github.event.workflow_run.head_branch == 'main' && 'main' ) || ( github.event.workflow_run.head_sha ) }}
46-
- name: Set up Python
47-
uses: actions/setup-python@v5
48-
with:
49-
python-version: "3.11"
50-
- uses: actions/cache@v4
51-
id: cache
52-
with:
53-
path: ${{ env.pythonLocation }}
54-
key: ${{ runner.os }}-python-github-actions-${{ env.pythonLocation }}-${{ hashFiles('requirements-github-actions.txt') }}-v01
55-
- name: Install GitHub Actions dependencies
56-
if: steps.cache.outputs.cache-hit != 'true'
57-
run: pip install -r requirements-github-actions.txt
5866
- name: Comment Deploy
59-
if: steps.deploy.outputs.url != ''
60-
run: python ./scripts/comment_docs_deploy_url_in_pr.py
67+
run: python ./scripts/deploy_docs_status.py
6168
env:
6269
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6370
DEPLOY_URL: ${{ steps.deploy.outputs.url }}
6471
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
72+
RUN_ID: ${{ github.run_id }}
73+
IS_DONE: "true"

.github/workflows/issue-manager.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Issue Manager
22

33
on:
44
schedule:
5-
- cron: "11 4 * * *"
5+
- cron: "13 18 * * *"
66
issue_comment:
77
types:
88
- created
@@ -16,10 +16,11 @@ on:
1616

1717
permissions:
1818
issues: write
19+
pull-requests: write
1920

2021
jobs:
2122
issue-manager:
22-
if: github.repository_owner == 'tiangolo'
23+
if: github.repository_owner == 'fastapi'
2324
runs-on: ubuntu-latest
2425
steps:
2526
- name: Dump GitHub context
@@ -35,8 +36,8 @@ jobs:
3536
"delay": 864000,
3637
"message": "Assuming the original need was handled, this will be automatically closed now. But feel free to add more comments or create new issues or PRs."
3738
},
38-
"changes-requested": {
39+
"waiting": {
3940
"delay": 2628000,
40-
"message": "As this PR had requested changes to be applied but has been inactive for a while, it's now going to be closed. But if there's anyone interested, feel free to create a new PR."
41+
"message": "As this PR has been waiting for the original user for a while but seems to be inactive, it's now going to be closed. But if there's anyone interested, feel free to create a new PR."
4142
}
4243
}

.github/workflows/labeler.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Labels
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- synchronize
7+
- reopened
8+
# For label-checker
9+
- labeled
10+
- unlabeled
11+
12+
jobs:
13+
labeler:
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/labeler@v5
20+
# Run this after labeler applied labels
21+
check-labels:
22+
needs:
23+
- labeler
24+
permissions:
25+
pull-requests: read
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: docker://agilepathway/pull-request-label-checker:latest
29+
with:
30+
one_of: breaking,security,feature,bug,refactor,upgrade,docs,lang-all,internal
31+
repo_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/latest-changes.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ jobs:
3030
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
3131
with:
3232
limit-access-to-actor: true
33-
- uses: docker://tiangolo/latest-changes:0.2.0
34-
# - uses: tiangolo/latest-changes@main
33+
- uses: tiangolo/[email protected]
3534
with:
3635
token: ${{ secrets.GITHUB_TOKEN }}
3736
latest_changes_file: docs/release-notes.md

.github/workflows/test-redistribute.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,15 @@ jobs:
5151
run: |
5252
cd dist
5353
pip wheel --no-deps sqlmodel*.tar.gz
54+
55+
# https://github.com/marketplace/actions/alls-green#why
56+
test-redistribute-alls-green: # This job does nothing and is only used for the branch protection
57+
if: always()
58+
needs:
59+
- test-redistribute
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Decide whether the needed jobs succeeded or failed
63+
uses: re-actors/alls-green@release/v1
64+
with:
65+
jobs: ${{ toJSON(needs) }}

0 commit comments

Comments
 (0)