From 743117e5767aadb08f5717c2bcf8e0ffded6398d Mon Sep 17 00:00:00 2001 From: Benjamin Bach Date: Thu, 7 Dec 2017 20:49:56 +0100 Subject: [PATCH] Strip well-known version component origin/ from remote version, fixes #3203 --- readthedocs/doc_builder/backends/sphinx.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/readthedocs/doc_builder/backends/sphinx.py b/readthedocs/doc_builder/backends/sphinx.py index 5c0616ca7cf..ce64a34981a 100644 --- a/readthedocs/doc_builder/backends/sphinx.py +++ b/readthedocs/doc_builder/backends/sphinx.py @@ -72,6 +72,12 @@ def get_config_params(self): ) remote_version = self.version.commit_name + # Replace "/origin" because upstream VCS does not recognize the local + # repo remote name + # Refs: https://github.com/rtfd/readthedocs.org/issues/3203 + if remote_version: + remote_version = remote_version.replace("origin/", "") + github_user, github_repo = version_utils.get_github_username_repo( url=self.project.repo) github_version_is_editable = (self.version.type == 'branch')