diff --git a/pull_request_codecommit/git/remote.py b/pull_request_codecommit/git/remote.py index 1781d38..b4b9685 100644 --- a/pull_request_codecommit/git/remote.py +++ b/pull_request_codecommit/git/remote.py @@ -19,7 +19,7 @@ def __regex(self, pattern: str, index: int = 1) -> Optional[str]: @property def supported(self) -> bool: - return self.__url.startswith("codecommit::") and self.name != "" + return self.__url.startswith("codecommit:") and self.name != "" @property def url(self) -> str: diff --git a/tests/test_command.py b/tests/test_command.py index 6aa3543..a1a15a9 100644 --- a/tests/test_command.py +++ b/tests/test_command.py @@ -66,6 +66,20 @@ def edit_message(message: str) -> str: b"[default]\nbranch: my-main\n[profile my-profile]\nbranch: my-master", COMMITS, ), + ( + "codecommit://my-profile@my-repository", + None, + "my-profile", + b"[default]\nbranch: my-main\n[profile my-profile]\nbranch: my-master", + COMMITS, + ), + ( + "codecommit://my-repository", + None, + None, + b"[default]\nbranch: my-main\n[profile my-profile]\nbranch: my-master", + COMMITS, + ), ], ) @patch("pull_request_codecommit.aws.client.subprocess.run")