Skip to content

RTD Previews: Get correct base branch for backports#150690

Merged
hugovk merged 1 commit into
python:mainfrom
StanFromIreland:rtd-preview-basebranch
Jun 21, 2026
Merged

RTD Previews: Get correct base branch for backports#150690
hugovk merged 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");

@StanFromIreland StanFromIreland May 31, 2026

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.

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.

@hugovk hugovk merged commit 082ac30 into python:main Jun 21, 2026
55 checks passed
@StanFromIreland StanFromIreland deleted the rtd-preview-basebranch branch June 21, 2026 17:29
@StanFromIreland StanFromIreland added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 21, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @StanFromIreland for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Jun 21, 2026

Copy link
Copy Markdown

GH-151867 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 21, 2026
StanFromIreland added a commit that referenced this pull request Jun 21, 2026
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.

2 participants