lineage-push: Add support for 'private' remote

Change-Id: Ifb31d8ad107469345215821fb4f90e61869f0271
This commit is contained in:
Luca Stefani
2018-12-25 12:41:25 +01:00
parent ccde24991f
commit 4dbcbe2fb6

View File

@@ -24,7 +24,7 @@ def push(args):
["git", "config", "review.review.lineageos.org.username"]).decode("utf-8").strip()
remotes = subprocess.check_output(
["git", "remote", "-v"]).decode("utf-8").strip()
if "github.com/LineageOS" in remotes:
if "github.com/LineageOS" in remotes or "git@github.com:LineageOS" in remotes:
repo = re.search(r'LineageOS\S+', remotes).group(0)
elif "android.googlesource.com" in remotes:
repo = re.search(r'platform\S+', remotes).group(0)