File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 25
25
from readthedocs .core .utils .extend import SettingsOverrideObject
26
26
from readthedocs .integrations .models import Integration
27
27
from readthedocs .invitations .models import Invitation
28
- from readthedocs .oauth .constants import GITHUB_APP
29
28
from readthedocs .oauth .models import RemoteRepository
30
29
from readthedocs .organizations .models import Team
31
30
from readthedocs .projects .constants import ADDONS_FLYOUT_SORTING_CUSTOM_PATTERN
@@ -231,8 +230,7 @@ def clean_prevalidation(self):
231
230
"""Disable the external builds option if the project doesn't meet the requirements."""
232
231
# If the project is attached to a GitHub app integration,
233
232
# it will always be able to build external versions.
234
- remote_repository = self .instance .remote_repository
235
- if remote_repository and remote_repository .vcs_provider == GITHUB_APP :
233
+ if self .instance .is_github_app_project :
236
234
return
237
235
238
236
integrations = list (self .instance .integrations .all ())
Original file line number Diff line number Diff line change 40
40
from readthedocs .domains .querysets import DomainQueryset
41
41
from readthedocs .domains .validators import check_domains_limit
42
42
from readthedocs .notifications .models import Notification as NewNotification
43
+ from readthedocs .oauth .constants import GITHUB_APP
43
44
from readthedocs .projects import constants
44
45
from readthedocs .projects .exceptions import ProjectConfigurationError
45
46
from readthedocs .projects .managers import HTMLFileManager
@@ -1013,6 +1014,10 @@ def is_github_project(self):
1013
1014
GitHubAppService ,
1014
1015
]
1015
1016
1017
+ @property
1018
+ def is_github_app_project (self ):
1019
+ return self .remote_repository and self .remote_repository .vcs_provider == GITHUB_APP
1020
+
1016
1021
@property
1017
1022
def is_gitlab_project (self ):
1018
1023
from readthedocs .oauth .services import GitLabService
You can’t perform that action at this time.
0 commit comments