Merge branch 'main' into sqlalchemy_polymorphic_support
This commit is contained in:
commit
7173b44a5c
3
.github/workflows/build-docs.yml
vendored
3
.github/workflows/build-docs.yml
vendored
@ -41,6 +41,7 @@ jobs:
|
|||||||
- mkdocs.no-insiders.yml
|
- mkdocs.no-insiders.yml
|
||||||
- .github/workflows/build-docs.yml
|
- .github/workflows/build-docs.yml
|
||||||
- .github/workflows/deploy-docs.yml
|
- .github/workflows/deploy-docs.yml
|
||||||
|
- data/**
|
||||||
|
|
||||||
build-docs:
|
build-docs:
|
||||||
needs:
|
needs:
|
||||||
@ -58,7 +59,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: "3.11"
|
python-version: "3.11"
|
||||||
- name: Setup uv
|
- name: Setup uv
|
||||||
uses: astral-sh/setup-uv@v3
|
uses: astral-sh/setup-uv@v4
|
||||||
with:
|
with:
|
||||||
version: "0.4.15"
|
version: "0.4.15"
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
|
2
.github/workflows/deploy-docs.yml
vendored
2
.github/workflows/deploy-docs.yml
vendored
@ -29,7 +29,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: "3.11"
|
python-version: "3.11"
|
||||||
- name: Setup uv
|
- name: Setup uv
|
||||||
uses: astral-sh/setup-uv@v3
|
uses: astral-sh/setup-uv@v4
|
||||||
with:
|
with:
|
||||||
version: "0.4.15"
|
version: "0.4.15"
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
|
2
.github/workflows/latest-changes.yml
vendored
2
.github/workflows/latest-changes.yml
vendored
@ -30,7 +30,7 @@ jobs:
|
|||||||
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
|
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
|
||||||
with:
|
with:
|
||||||
limit-access-to-actor: true
|
limit-access-to-actor: true
|
||||||
- uses: tiangolo/latest-changes@0.3.1
|
- uses: tiangolo/latest-changes@0.3.2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
latest_changes_file: docs/release-notes.md
|
latest_changes_file: docs/release-notes.md
|
||||||
|
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@ -34,4 +34,4 @@ jobs:
|
|||||||
TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
|
TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
|
||||||
run: python -m build
|
run: python -m build
|
||||||
- name: Publish
|
- name: Publish
|
||||||
uses: pypa/gh-action-pypi-publish@v1.9.0
|
uses: pypa/gh-action-pypi-publish@v1.12.3
|
||||||
|
2
.github/workflows/smokeshow.yml
vendored
2
.github/workflows/smokeshow.yml
vendored
@ -21,7 +21,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: '3.9'
|
||||||
- name: Setup uv
|
- name: Setup uv
|
||||||
uses: astral-sh/setup-uv@v3
|
uses: astral-sh/setup-uv@v4
|
||||||
with:
|
with:
|
||||||
version: "0.4.15"
|
version: "0.4.15"
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
|
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@ -44,7 +44,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Setup uv
|
- name: Setup uv
|
||||||
uses: astral-sh/setup-uv@v3
|
uses: astral-sh/setup-uv@v4
|
||||||
with:
|
with:
|
||||||
version: "0.4.15"
|
version: "0.4.15"
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
@ -92,7 +92,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: '3.12'
|
python-version: '3.12'
|
||||||
- name: Setup uv
|
- name: Setup uv
|
||||||
uses: astral-sh/setup-uv@v3
|
uses: astral-sh/setup-uv@v4
|
||||||
with:
|
with:
|
||||||
version: "0.4.15"
|
version: "0.4.15"
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
members:
|
members:
|
||||||
- login: tiangolo
|
- login: tiangolo
|
||||||
- login: estebanx64
|
|
||||||
- login: alejsdev
|
- login: alejsdev
|
||||||
|
@ -17,6 +17,12 @@
|
|||||||
|
|
||||||
### Internal
|
### Internal
|
||||||
|
|
||||||
|
* ⬆ Bump pypa/gh-action-pypi-publish from 1.9.0 to 1.12.3. PR [#1240](https://github.com/fastapi/sqlmodel/pull/1240) by [@dependabot[bot]](https://github.com/apps/dependabot).
|
||||||
|
* ⬆ Bump astral-sh/setup-uv from 3 to 4. PR [#1225](https://github.com/fastapi/sqlmodel/pull/1225) by [@dependabot[bot]](https://github.com/apps/dependabot).
|
||||||
|
* ⬆ Bump tiangolo/latest-changes from 0.3.1 to 0.3.2. PR [#1207](https://github.com/fastapi/sqlmodel/pull/1207) by [@dependabot[bot]](https://github.com/apps/dependabot).
|
||||||
|
* 🔨 Update docs previews script. PR [#1236](https://github.com/fastapi/sqlmodel/pull/1236) by [@tiangolo](https://github.com/tiangolo).
|
||||||
|
* 🔧 Update build-docs filter paths. PR [#1235](https://github.com/fastapi/sqlmodel/pull/1235) by [@tiangolo](https://github.com/tiangolo).
|
||||||
|
* 🔧 Update team members. PR [#1234](https://github.com/fastapi/sqlmodel/pull/1234) by [@tiangolo](https://github.com/tiangolo).
|
||||||
* ⬆️ Upgrade markdown-include-variants to version 0.0.3. PR [#1152](https://github.com/fastapi/sqlmodel/pull/1152) by [@tiangolo](https://github.com/tiangolo).
|
* ⬆️ Upgrade markdown-include-variants to version 0.0.3. PR [#1152](https://github.com/fastapi/sqlmodel/pull/1152) by [@tiangolo](https://github.com/tiangolo).
|
||||||
* 👷 Update issue manager workflow. PR [#1137](https://github.com/fastapi/sqlmodel/pull/1137) by [@alejsdev](https://github.com/alejsdev).
|
* 👷 Update issue manager workflow. PR [#1137](https://github.com/fastapi/sqlmodel/pull/1137) by [@alejsdev](https://github.com/alejsdev).
|
||||||
* 👷 Fix smokeshow, checkout files on CI. PR [#1136](https://github.com/fastapi/sqlmodel/pull/1136) by [@tiangolo](https://github.com/tiangolo).
|
* 👷 Fix smokeshow, checkout files on CI. PR [#1136](https://github.com/fastapi/sqlmodel/pull/1136) by [@tiangolo](https://github.com/tiangolo).
|
||||||
|
@ -2,9 +2,11 @@ import logging
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
from github import Github
|
from github import Github
|
||||||
from pydantic import SecretStr
|
from pydantic import BaseModel, SecretStr
|
||||||
from pydantic_settings import BaseSettings
|
from pydantic_settings import BaseSettings
|
||||||
|
|
||||||
|
site_domain = "sqlmodel.tiangolo.com"
|
||||||
|
|
||||||
|
|
||||||
class Settings(BaseSettings):
|
class Settings(BaseSettings):
|
||||||
github_repository: str
|
github_repository: str
|
||||||
@ -15,7 +17,12 @@ class Settings(BaseSettings):
|
|||||||
is_done: bool = False
|
is_done: bool = False
|
||||||
|
|
||||||
|
|
||||||
def main():
|
class LinkData(BaseModel):
|
||||||
|
previous_link: str
|
||||||
|
preview_link: str
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> None:
|
||||||
logging.basicConfig(level=logging.INFO)
|
logging.basicConfig(level=logging.INFO)
|
||||||
settings = Settings()
|
settings = Settings()
|
||||||
|
|
||||||
@ -60,24 +67,31 @@ def main():
|
|||||||
docs_files = [f for f in files if f.filename.startswith("docs/")]
|
docs_files = [f for f in files if f.filename.startswith("docs/")]
|
||||||
|
|
||||||
deploy_url = settings.deploy_url.rstrip("/")
|
deploy_url = settings.deploy_url.rstrip("/")
|
||||||
links: list[str] = []
|
links: list[LinkData] = []
|
||||||
for f in docs_files:
|
for f in docs_files:
|
||||||
match = re.match(r"docs/(.*)", f.filename)
|
match = re.match(r"docs/(.*)", f.filename)
|
||||||
assert match
|
if not match:
|
||||||
|
continue
|
||||||
path = match.group(1)
|
path = match.group(1)
|
||||||
if path.endswith("index.md"):
|
if path.endswith("index.md"):
|
||||||
path = path.replace("index.md", "")
|
use_path = path.replace("index.md", "")
|
||||||
else:
|
else:
|
||||||
path = path.replace(".md", "/")
|
use_path = path.replace(".md", "/")
|
||||||
link = f"{deploy_url}/{path}"
|
link = LinkData(
|
||||||
|
previous_link=f"https://{site_domain}/{use_path}",
|
||||||
|
preview_link=f"{deploy_url}/{use_path}",
|
||||||
|
)
|
||||||
links.append(link)
|
links.append(link)
|
||||||
links.sort()
|
links.sort(key=lambda x: x.preview_link)
|
||||||
|
|
||||||
message = f"📝 Docs preview for commit {settings.commit_sha} at: {deploy_url}"
|
message = f"📝 Docs preview for commit {settings.commit_sha} at: {deploy_url}"
|
||||||
|
|
||||||
if links:
|
if links:
|
||||||
message += "\n\n### Modified Pages\n\n"
|
message += "\n\n### Modified Pages\n\n"
|
||||||
message += "\n".join([f"* {link}" for link in links])
|
for link in links:
|
||||||
|
message += f"* {link.preview_link}"
|
||||||
|
message += f" - ([before]({link.previous_link}))"
|
||||||
|
message += "\n"
|
||||||
|
|
||||||
print(message)
|
print(message)
|
||||||
use_pr.as_issue().create_comment(message)
|
use_pr.as_issue().create_comment(message)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user