testboard: alwaus use https URLs

The AWS test runner does not have a GitHub ssh key, so can only
access repositories via https.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
This commit is contained in:
Gerwin Klein 2021-09-22 14:43:38 +10:00 committed by Gerwin Klein
parent 512f62858a
commit ce302e0c65
1 changed files with 5 additions and 1 deletions

View File

@ -61,9 +61,13 @@ def subprocess_output(*args, **kwargs):
# to be public.
def fixup_github(remote):
git_url = 'git@github.com:'
ssh_url = 'ssh://' + git_url
https_url = 'https://github.com/'
url, repo = remote
if url.startswith(git_url):
return 'https://github.com/' + url[len(git_url):], repo
return https_url + url[len(git_url):], repo
elif url.startswith(ssh_url):
return https_url + url[len(ssh_url):], repo
else:
return remote