mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-03 04:10:49 +08:00
Remove non implemented method _prepare_clone_url_with_token from providers which don't support it and instead, issue a warning in base class.
This commit is contained in:
@ -46,9 +46,10 @@ class GitProvider(ABC):
|
||||
shutil.rmtree(self.path, ignore_errors=True)
|
||||
|
||||
@abstractmethod
|
||||
#Method to allow implementors to manipulate the repo url to clone (such as embedding tokens in the url string).
|
||||
#Method to allow implementors to manipulate the repo url to clone (such as embedding tokens in the url string). Needs to be implemented by the provider.
|
||||
def _prepare_clone_url_with_token(self, repo_url_to_clone: str) -> str | None:
|
||||
pass
|
||||
get_logger().warning("Not implemented! Returning None")
|
||||
return None
|
||||
|
||||
# Does a shallow clone, using a forked process to support a timeout guard.
|
||||
# In case operation has failed, it is expected to throw an exception as this method does not return a value.
|
||||
|
Reference in New Issue
Block a user