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 gh issue URLs as problem statements
Kilian Lieretb35bd7e85f48
diff --git a/sweagent/environment/utils.py b/sweagent/environment/utils.pyindex 8cd361c5..511a89ce 100644--- a/sweagent/environment/utils.py+++ b/sweagent/environment/utils.py@@ -590,7 +590,7 @@ def get_instances(pass# The next if statement is very brittle logic to determine if we're processing a single instance- if file_path.startswith("text://") or (Path(file_path).is_file() and Path(file_path).suffix in ['.md', '.txt']):+ if file_path.startswith("text://") or (Path(file_path).is_file() and Path(file_path).suffix in ['.md', '.txt']) or is_github_issue_url(file_path):ib = InstanceBuilder(token=token)ib.set_problem_statement(file_path)if repo_path: