Skip to content

Commit 5467ed6

Browse files
authored
docs: fix pr doc builds by removing external_version_warning plugin (#3244)
Doc builds for PR were failing because the readthedocs_ext.external_version_warning plugin wasn't handling something correctly. Activating it manually was originally done to get the warning banners to appear, but it looks like RTD now displays a warning banner without this special plugin being needed. Since it's now unnecessary, remove the code that can activate it.
1 parent e8d9cab commit 5467ed6

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

docs/conf.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -102,26 +102,6 @@
102102
# to the original conf.py template comments
103103
extensions.insert(0, "readthedocs_ext.readthedocs")
104104

105-
if os.environ.get("READTHEDOCS_VERSION_TYPE") == "external":
106-
# Insert after the main extension
107-
extensions.insert(1, "readthedocs_ext.external_version_warning")
108-
readthedocs_vcs_url = (
109-
"http://github.com/bazel-contrib/rules_python/pull/{}".format(
110-
os.environ.get("READTHEDOCS_VERSION", "")
111-
)
112-
)
113-
# The build id isn't directly available, but it appears to be encoded
114-
# into the host name, so we can parse it from that. The format appears
115-
# to be `build-X-project-Y-Z`, where:
116-
# * X is an integer build id
117-
# * Y is an integer project id
118-
# * Z is the project name
119-
_build_id = os.environ.get("HOSTNAME", "build-0-project-0-rules-python")
120-
_build_id = _build_id.split("-")[1]
121-
readthedocs_build_url = (
122-
f"https://readthedocs.org/projects/rules-python/builds/{_build_id}"
123-
)
124-
125105
exclude_patterns = ["_includes/*"]
126106
templates_path = ["_templates"]
127107
primary_domain = None # The default is 'py', which we don't make much use of

0 commit comments

Comments
 (0)