File tree 2 files changed +4
-5
lines changed
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 70
70
get_gitlab_username_repo ,
71
71
)
72
72
from readthedocs .builds .version_slug import VersionSlugField
73
+ from readthedocs .oauth .models import RemoteRepository
73
74
74
75
75
76
log = logging .getLogger (__name__ )
@@ -779,7 +780,7 @@ def get_commit_url(self):
779
780
repo = repo ,
780
781
commit = self .commit
781
782
)
782
- elif 'gitlab' in repo_url :
783
+ if 'gitlab' in repo_url :
783
784
user , repo = get_gitlab_username_repo (repo_url )
784
785
if not user and not repo :
785
786
return ''
@@ -790,7 +791,7 @@ def get_commit_url(self):
790
791
repo = repo ,
791
792
commit = self .commit
792
793
)
793
- elif 'bitbucket' in repo_url :
794
+ if 'bitbucket' in repo_url :
794
795
user , repo = get_bitbucket_username_repo (repo_url )
795
796
if not user and not repo :
796
797
return ''
@@ -801,8 +802,6 @@ def get_commit_url(self):
801
802
repo = repo ,
802
803
commit = self .commit
803
804
)
804
- else :
805
- log .info ('Unknown Git provider for %s' , self .project )
806
805
807
806
return ''
808
807
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ def setUp(self):
46
46
class TestVersionModel (VersionMixin , TestCase ):
47
47
48
48
def test_vcs_url_for_external_version (self ):
49
- expected_url = f'https://github.com/pypa/pip/pull/{ self .external_version .verbose_name } / '
49
+ expected_url = f'https://github.com/pypa/pip/pull/{ self .external_version .verbose_name } '
50
50
self .assertEqual (self .external_version .vcs_url , expected_url )
51
51
52
52
def test_vcs_url_for_latest_version (self ):
You can’t perform that action at this time.
0 commit comments