mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-04-29 03:00:45 -04:00
bugfix: selected_repository may includes more then two parts, could b… (#7114)
This commit is contained in:
@@ -274,7 +274,7 @@ class Runtime(FileEditRuntimeMixin):
|
||||
'github_token and selected_repository must be provided to clone a repository'
|
||||
)
|
||||
url = f'https://{github_token.get_secret_value()}@github.com/{selected_repository}.git'
|
||||
dir_name = selected_repository.split('/')[1]
|
||||
dir_name = selected_repository.split('/')[-1]
|
||||
|
||||
# Generate a random branch name to avoid conflicts
|
||||
random_str = ''.join(
|
||||
@@ -313,7 +313,7 @@ class Runtime(FileEditRuntimeMixin):
|
||||
microagents_dir = workspace_root / '.openhands' / 'microagents'
|
||||
repo_root = None
|
||||
if selected_repository:
|
||||
repo_root = workspace_root / selected_repository.split('/')[1]
|
||||
repo_root = workspace_root / selected_repository.split('/')[-1]
|
||||
microagents_dir = repo_root / '.openhands' / 'microagents'
|
||||
self.log(
|
||||
'info',
|
||||
|
||||
Reference in New Issue
Block a user