Skip to content

RTD Previews: Get correct base branch for backports#150690

Open
StanFromIreland wants to merge 1 commit into
python:mainfrom
StanFromIreland:rtd-preview-basebranch
Open

RTD Previews: Get correct base branch for backports#150690
StanFromIreland wants to merge 1 commit into
python:mainfrom
StanFromIreland:rtd-preview-basebranch

Conversation

@StanFromIreland
Copy link
Copy Markdown
Member

It is currently hard-coded to main, so 3.15 backports don't get previews as the merge will always fail.

Comment thread .readthedocs.yml
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ];
then
base_branch=main;
base_branch=$(wget -qO- "https://api.github.com/repos/python/cpython/pulls/$READTHEDOCS_VERSION" | jq -er ".base.ref");
Copy link
Copy Markdown
Member Author

@StanFromIreland StanFromIreland May 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using READTHEDOCS_VERSION works because for PR builds it is the PR number.

Comment thread .readthedocs.yml
tools:
python: "3"
apt_packages:
- jq
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this PR's build, installing jq adds ~3 seconds to the total build time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant