41
41
INTERNAL ,
42
42
LATEST ,
43
43
NON_REPOSITORY_VERSIONS ,
44
- PULL_REQUEST ,
44
+ EXTERNAL ,
45
45
STABLE ,
46
46
TAG ,
47
47
VERSION_TYPES ,
@@ -126,7 +126,7 @@ class Version(models.Model):
126
126
objects = VersionManager .from_queryset (VersionQuerySet )()
127
127
# Only include BRANCH, TAG, UNKONWN type Versions.
128
128
internal = InternalVersionManager .from_queryset (VersionQuerySet )()
129
- # Only include PULL_REQUEST type Versions.
129
+ # Only include EXTERNAL type Versions.
130
130
external = ExternalVersionManager .from_queryset (VersionQuerySet )()
131
131
132
132
class Meta :
@@ -162,7 +162,7 @@ def vcs_url(self):
162
162
Generate VCS (github, gitlab, bitbucket) URL for this version.
163
163
164
164
Branch/Tag Example: https://github.com/rtfd/readthedocs.org/tree/3.4.2/.
165
- Pull Request Example: https://github.com/rtfd/readthedocs.org/pull/9999/.
165
+ Pull/merge Request Example: https://github.com/rtfd/readthedocs.org/pull/9999/.
166
166
"""
167
167
url = ''
168
168
if self .slug == STABLE :
@@ -172,7 +172,7 @@ def vcs_url(self):
172
172
else :
173
173
slug_url = self .slug
174
174
175
- if self .type == PULL_REQUEST :
175
+ if self .type == EXTERNAL :
176
176
if 'github' in self .project .repo :
177
177
url = f'/pull/{ slug_url } /'
178
178
@@ -252,14 +252,14 @@ def commit_name(self):
252
252
# the actual tag name.
253
253
return self .verbose_name
254
254
255
- if self .type == PULL_REQUEST :
256
- # If this version is a Pull Request , the identifier will
255
+ if self .type == EXTERNAL :
256
+ # If this version is a EXTERNAL version , the identifier will
257
257
# contain the actual commit hash. which we can use to
258
258
# generate url for a given file name
259
259
return self .identifier
260
260
261
261
# If we came that far it's not a special version
262
- # nor a branch, tag or Pull Request .
262
+ # nor a branch, tag or EXTERNAL version .
263
263
# Therefore just return the identifier to make a safe guess.
264
264
log .debug (
265
265
'TODO: Raise an exception here. Testing what cases it happens' ,
0 commit comments