Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Docs: Fix build preview banner#104082

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
hugovk wants to merge1 commit intopython:mainfromhugovk:docs-banner
Closed

Conversation

hugovk
Copy link
Member

There should be a banner at the top of PR build previews for docs. Here's it working on this branch as a PR on my fork:

image

But for some reason it's missing for this upstream:

TODO

The code to control this:

cpython/Doc/conf.py

Lines 117 to 124 inf0ad456

# Deployment preview information
# (See .readthedocs.yml and https://docs.readthedocs.io/en/stable/reference/environment-variables.html)
repository_url=os.getenv("READTHEDOCS_GIT_CLONE_URL")
html_context= {
"is_deployment_preview":os.getenv("READTHEDOCS_VERSION_TYPE")=="external",
"repository_url":repository_url.removesuffix(".git")ifrepository_urlelseNone,
"pr_id":os.getenv("READTHEDOCS_VERSION")
}

Let's start with a draft PR to debug the env vars.

@hugovk
Copy link
MemberAuthor

It's working here too:

image

https://cpython-previews--104082.org.readthedocs.build/en/104082/


Looking at another PR build that is missing the banner:

The RtD build page says:

Configure your documentation builds! Adding a.readthedocs.yaml file to your project is the recommended way to configure your documentation builds. You can declare dependencies, set up submodules, and many other great features.

And looking at the PR, it's from before the#103843 was merged that updatedconf.py, so I think we're good here.

One thing to do though, is backport#103843 to at least 3.11 so we get banners on backport builds too.

@hugovk
Copy link
MemberAuthor

Backport PR:#104083

@hugovkhugovk closed thisMay 2, 2023
@hugovkhugovk deleted the docs-banner branchMay 24, 2023 15:48
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@hugovk@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp