From 86a73b0a0b2e93cee4625c2273fb6b146ba90e40 Mon Sep 17 00:00:00 2001 From: Adafruit Adabot Date: Mon, 5 Mar 2018 15:27:25 -0800 Subject: [PATCH] Handle urls without .git extension. --- adabot/circuitpython_bundle.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/adabot/circuitpython_bundle.py b/adabot/circuitpython_bundle.py index 8a5eb03..ba59d96 100644 --- a/adabot/circuitpython_bundle.py +++ b/adabot/circuitpython_bundle.py @@ -184,7 +184,9 @@ def get_contributors(repo, commit_range): def repo_name(url): # Strips off .git and splits on / - url = url[:-4].split("/") + if url.endswith(".git"): + url = url[:-4] + url = url.split("/") return url[-2] + "/" + url[-1] def add_contributors(master_list, additions):