mirror of
https://github.com/python/cpython.git
synced 2026-06-26 21:04:42 -04:00
[3.15] RTD Previews: Get correct base branch for backports (GH-150690) (#151867)
Co-authored-by: Stan Ulbrych <stan@python.org>
This commit is contained in:
committed by
GitHub
parent
f5119a536a
commit
a2d2ee8e9e
+5
-3
@@ -11,19 +11,21 @@ build:
|
||||
os: ubuntu-24.04
|
||||
tools:
|
||||
python: "3"
|
||||
apt_packages:
|
||||
- jq
|
||||
|
||||
jobs:
|
||||
post_checkout:
|
||||
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 aren't changes in the Doc
|
||||
# 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=main;
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user