SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]
Fix: Handling of trailing slashes in gh repos
Kilian Lieret30738901d843
diff --git a/sweagent/environment/config/repo.py b/sweagent/environment/config/repo.pyindex eb5c72e9..5272c65d 100644--- a/sweagent/environment/config/repo.py+++ b/sweagent/environment/config/repo.py@@ -11,6 +11,7 @@ from swerex.deployment.abstract import AbstractDeploymentfrom swerex.runtime.abstract import Command, UploadRequestfrom typing_extensions import Self+from sweagent.utils.github import _parse_gh_repo_urlfrom sweagent.utils.log import get_loggerlogger = get_logger("swea-config", emoji="🔧")@@ -90,8 +91,7 @@ class GithubRepoConfig(BaseModel):@propertydef repo_name(self) -> str:- # fixme: Need to replace ":" etc.- org, repo = self.url.split("/")[-2:]+ org, repo = _parse_gh_repo_url(self.url)return f"{org}__{repo}"def _get_url_with_token(self, token: str) -> str: