Skip to content

Commit 4bc32a6

Browse files
committed
renamed clone_repository method to clone_sync_repository to better match the functionality
1 parent dffe4f6 commit 4bc32a6

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

deep_code/tests/utils/test_github_automation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def test_clone_repository_new(self, mock_run):
4444

4545
# Mock os.path.exists to return False (directory does not exist)
4646
with patch("os.path.exists", return_value=False):
47-
self.github_automation.clone_repository()
47+
self.github_automation.clone_sync_repository()
4848

4949
# Assertions
5050
mock_run.assert_called_once_with(
@@ -65,7 +65,7 @@ def test_clone_repository_existing(self, mock_run):
6565
# Mock os.path.exists to return True (directory exists)
6666
with patch("os.path.exists", return_value=True):
6767
with patch("os.chdir"):
68-
self.github_automation.clone_repository()
68+
self.github_automation.clone_sync_repository()
6969

7070
# Assertions
7171
mock_run.assert_called_once_with(["git", "pull"], check=True)

deep_code/tools/publish.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(self):
5353
self.github_username, self.github_token, OSC_REPO_OWNER, OSC_REPO_NAME
5454
)
5555
self.github_automation.fork_repository()
56-
self.github_automation.clone_repository()
56+
self.github_automation.clone_sync_repository()
5757

5858
def publish_files(
5959
self,

deep_code/utils/github_automation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def fork_repository(self):
4545
response.raise_for_status()
4646
logging.info(f"Repository forked to {self.username}/{self.repo_name}")
4747

48-
def clone_repository(self):
48+
def clone_sync_repository(self):
4949
"""Clone the forked repository locally if it doesn't exist, or pull updates if it does."""
5050
logging.info("Checking local repository...")
5151
if not os.path.exists(self.local_clone_dir):

0 commit comments

Comments
 (0)