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 ,
@@ -119,7 +119,7 @@ class Version(models.Model):
119
119
objects = VersionManager .from_queryset (VersionQuerySet )()
120
120
# Only include BRANCH, TAG, UNKONWN type Versions.
121
121
internal = InternalVersionManager .from_queryset (VersionQuerySet )()
122
- # Only include PULL_REQUEST type Versions.
122
+ # Only include EXTERNAL type Versions.
123
123
external = ExternalVersionManager .from_queryset (VersionQuerySet )()
124
124
125
125
class Meta :
@@ -155,7 +155,7 @@ def vcs_url(self):
155
155
Generate VCS (github, gitlab, bitbucket) URL for this version.
156
156
157
157
Branch/Tag Example: https://github.com/rtfd/readthedocs.org/tree/3.4.2/.
158
- Pull Request Example: https://github.com/rtfd/readthedocs.org/pull/9999/.
158
+ Pull/merge Request Example: https://github.com/rtfd/readthedocs.org/pull/9999/.
159
159
"""
160
160
url = ''
161
161
if self .slug == STABLE :
@@ -165,7 +165,7 @@ def vcs_url(self):
165
165
else :
166
166
slug_url = self .slug
167
167
168
- if self .type == PULL_REQUEST :
168
+ if self .type == EXTERNAL :
169
169
if 'github' in self .project .repo :
170
170
url = f'/pull/{ slug_url } /'
171
171
@@ -245,14 +245,14 @@ def commit_name(self):
245
245
# the actual tag name.
246
246
return self .verbose_name
247
247
248
- if self .type == PULL_REQUEST :
249
- # If this version is a Pull Request , the identifier will
248
+ if self .type == EXTERNAL :
249
+ # If this version is a EXTERNAL version , the identifier will
250
250
# contain the actual commit hash. which we can use to
251
251
# generate url for a given file name
252
252
return self .identifier
253
253
254
254
# If we came that far it's not a special version
255
- # nor a branch, tag or Pull Request .
255
+ # nor a branch, tag or EXTERNAL version .
256
256
# Therefore just return the identifier to make a safe guess.
257
257
log .debug (
258
258
'TODO: Raise an exception here. Testing what cases it happens' ,
0 commit comments