From 8c3b7031503a9986c21b47dc5f760c92c9a4e57c Mon Sep 17 00:00:00 2001 From: Jeremy Waller Date: Tue, 9 Nov 2021 13:49:12 -0600 Subject: [PATCH 1/2] fix regex parsing --- src/github_proxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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( From b7ab0997e8c5fed06b5fcf4948cd9cd71a2e537a Mon Sep 17 00:00:00 2001 From: Jeremy Waller Date: Tue, 9 Nov 2021 14:31:26 -0600 Subject: [PATCH 2/2] test update --- test/unit/test_github_proxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'