diff --git a/src/github_proxy.py b/src/github_proxy.py index f95208f..17a65d7 100644 --- a/src/github_proxy.py +++ b/src/github_proxy.py @@ -111,7 +111,7 @@ def _init_github_info(self): ' parameter to specify a token to use when writing to GitHub.'.format(config.PROJECT_NAME)) github_location = project_details['source']['location'] - matches = re.search(r'github\.com\/(.+)\/(.+)\.git$', github_location) + matches = re.search(r'github\.com\/(.+)\/(.+)$', github_location) if not matches: raise RuntimeError( 'Could not parse GitHub owner/repo name from AWS CodeBuild project {}. location={}'.format( diff --git a/test/unit/test_github_proxy.py b/test/unit/test_github_proxy.py index 4d52d65..f63ad7c 100644 --- a/test/unit/test_github_proxy.py +++ b/test/unit/test_github_proxy.py @@ -6,7 +6,7 @@ GITHUB_OWNER = 'gh-user' GITHUB_REPO = 'gh-repo' -GITHUB_LOCATION = 'https://github.com/{}/{}.git'.format(GITHUB_OWNER, GITHUB_REPO) +GITHUB_LOCATION = 'https://github.com/{}/{}'.format(GITHUB_OWNER, GITHUB_REPO) CODEBUILD_GITHUB_TOKEN = 'shhh!!' SECRETS_MANAGER_GITHUB_TOKEN = "don't tell!!" BUILD_STATUS = 'SUCCEEDED'