Skip to content

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]

Handle repo_name with quote '

Meet Udeshia6633ccc4f13
diff --git a/sweagent/environment/swe_env.py b/sweagent/environment/swe_env.py
index 5b5b97cd..b67ca169 100644
--- a/sweagent/environment/swe_env.py
+++ b/sweagent/environment/swe_env.py
@@ -238,7 +238,7 @@ class SWEEnv(gym.Env):
def _repo_name(self) -> str:
"""Name of the local copy of the repository"""
assert self.record is not None
- return self.record["repo"].replace("/", "__").replace(" ", "-")
+ return self.record["repo"].replace("/", "__").replace(" ", "-").replace("'", "")
def _copy_repo(self) -> str:
"""Clone/copy repository/codebase in container