Browse Source

Merge branch 'master' into french-translation

pull/11963/head
Sebastián Ramírez 10 months ago
committed by GitHub
parent
commit
fd09109481
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      docs/en/docs/release-notes.md
  2. 9
      scripts/deploy_docs_status.py

1
docs/en/docs/release-notes.md

@ -19,6 +19,7 @@ hide:
### Internal
* 🔨 Refactor script `deploy_docs_status.py` to account for deploy URLs with or without trailing slash. PR [#11965](https://github.com/fastapi/fastapi/pull/11965) by [@tiangolo](https://github.com/tiangolo).
* 🔒️ Update permissions for deploy-docs action. PR [#11964](https://github.com/fastapi/fastapi/pull/11964) by [@tiangolo](https://github.com/tiangolo).
* 👷🏻 Add deploy docs status and preview links to PRs. PR [#11961](https://github.com/fastapi/fastapi/pull/11961) by [@tiangolo](https://github.com/tiangolo).
* 🔧 Update docs setup with latest configs and plugins. PR [#11953](https://github.com/fastapi/fastapi/pull/11953) by [@tiangolo](https://github.com/tiangolo).

9
scripts/deploy_docs_status.py

@ -49,6 +49,7 @@ def main():
files = list(use_pr.get_files())
docs_files = [f for f in files if f.filename.startswith("docs/")]
deploy_url = settings.deploy_url.rstrip("/")
lang_links: dict[str, list[str]] = {}
for f in docs_files:
match = re.match(r"docs/([^/]+)/docs/(.*)", f.filename)
@ -60,9 +61,9 @@ def main():
else:
path = path.replace(".md", "/")
if lang == "en":
link = f"{settings.deploy_url}{path}"
link = f"{deploy_url}/{path}"
else:
link = f"{settings.deploy_url}{lang}/{path}"
link = f"{deploy_url}/{lang}/{path}"
lang_links.setdefault(lang, []).append(link)
links: list[str] = []
@ -79,9 +80,7 @@ def main():
current_lang_links.sort()
links.extend(current_lang_links)
message = (
f"📝 Docs preview for commit {settings.commit_sha} at: {settings.deploy_url}"
)
message = f"📝 Docs preview for commit {settings.commit_sha} at: {deploy_url}"
if links:
message += "\n\n### Modified Pages\n\n"

Loading…
Cancel
Save