Yuvipanda has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/206758

Change subject: Support repositories without protocol specified
......................................................................

Support repositories without protocol specified

Change-Id: I14031a47b55c04c52e5c61f09229a0008961d84e
---
M generate.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/cdnjs-index 
refs/changes/58/206758/1

diff --git a/generate.py b/generate.py
index 5f845f7..7f3c8ec 100644
--- a/generate.py
+++ b/generate.py
@@ -41,8 +41,8 @@
         url = package['repository']['url']
 
     if url is not None and 'github.com/' in url:
-        parts = url.split('/')
-        user_name, repo_name = parts[3], parts[4]
+        parts = url.replace('http://', '').replace('https://', '').split('/')
+        user_name, repo_name = parts[1], parts[2]
         if repo_name.endswith('.git'):
             repo_name = repo_name[:-4]
         print 'Fetching starcount for %s/%s' % (user_name, repo_name)

-- 
To view, visit https://gerrit.wikimedia.org/r/206758
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I14031a47b55c04c52e5c61f09229a0008961d84e
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/cdnjs-index
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to