-
-
Notifications
You must be signed in to change notification settings - Fork 34.8k
[3.10] RTD Previews: Get correct base branch for backports (GH-150690) #153167
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hugovk
wants to merge
2
commits into
python:3.10
Choose a base branch
from
hugovk:backport-082ac30-3.10
base: 3.10
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,60 @@ | ||
| # This is a dummy config file so that readthedocs.org doesn't fail on security branches. | ||
| # Note that this won't result in docs actually getting built; | ||
| # clicking on the docs preview link on a PR will result in a 404. | ||
| # Read the Docs configuration file | ||
| # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
| # Project page: https://readthedocs.org/projects/cpython-previews/ | ||
|
|
||
| version: 2 | ||
| formats: [] | ||
|
|
||
| sphinx: | ||
| configuration: Doc/conf.py | ||
| configuration: Doc/conf.py | ||
|
|
||
| build: | ||
| os: "ubuntu-22.04" | ||
| os: ubuntu-24.04 | ||
| tools: | ||
| python: "3.11" | ||
| python: "3" | ||
| apt_packages: | ||
| - jq | ||
|
|
||
| jobs: | ||
| post_checkout: | ||
| - exit 183 | ||
| post_system_dependencies: | ||
| # https://docs.readthedocs.com/platform/stable/guides/build/skip-build.html#skip-builds-based-on-conditions | ||
| # | ||
| # Cancel building pull requests when there are no changes in the Doc | ||
| # directory or RTD configuration, or if we can't cleanly merge the base | ||
| # branch. | ||
| - | | ||
| set -eEux; | ||
| if [ "$READTHEDOCS_VERSION_TYPE" = "external" ]; | ||
| then | ||
| base_branch=$(wget -qO- "https://api.github.com/repos/python/cpython/pulls/$READTHEDOCS_VERSION" | jq -er ".base.ref"); | ||
| git fetch --depth=50 origin $base_branch:origin-$base_branch; | ||
| for attempt in $(seq 10); | ||
| do | ||
| if ! git merge-base HEAD origin-$base_branch; | ||
| then | ||
| git fetch --deepen=50 origin $base_branch; | ||
| else | ||
| break; | ||
| fi; | ||
| done; | ||
| if ! git -c "user.name=rtd" -c "user.email=no-reply@readthedocs.org" merge --no-stat --no-edit origin-$base_branch; | ||
| then | ||
| echo "Unsuccessful merge with '$base_branch' branch, skipping the build"; | ||
| exit 183; | ||
| fi; | ||
| if git diff --exit-code --stat origin-$base_branch -- Doc/ .readthedocs.yml; | ||
| then | ||
| echo "No changes to Doc/ - skipping the build."; | ||
| exit 183; | ||
| fi; | ||
| fi; | ||
| create_environment: | ||
| - echo "Skipping default environment creation" | ||
| install: | ||
| - asdf plugin add uv | ||
| - asdf install uv latest | ||
| - asdf global uv latest | ||
| build: | ||
| html: | ||
| - make -C Doc venv html | ||
| - mkdir -p "$READTHEDOCS_OUTPUT" | ||
| - mv Doc/build/html "$READTHEDOCS_OUTPUT/" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.