Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: selected_repository may includes more then two parts, could b… #7114

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions openhands/runtime/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def clone_repo(
'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(
Expand Down Expand Up @@ -313,7 +313,7 @@ def get_microagents_from_selected_repo(
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',
Expand Down
Loading