SWE-agent
SWE-agent copied to clipboard
Add Support for git platforms like gitlab, gog, azure devops, ...
Describe the feature
Hey there! π
Love what you've done with this repo, it's super helpful! But I hit a snag when trying to use it with my Gogs setup.
Here's what happened:
I tried running:
python run.py --model_name ollama:kistral-16384 --host_url http://localhost:11434 --data_path http://192.168.1.109:3000/kent/test-coolpaper/issues/1 --config_file config/default_from_url.yaml --per_instance_cost_limit 5.00
But got this error:
ValueError: Could not load instances from http://192.168.1.109:3000/kent/test-coolpaper/issues/1. Please ensure --data_path is a GitHub URL, a SWE-bench HuggingFace dataset, or a JSON/JSONL file.
It looks like the tool only works with GitHub right now. Any chance we could add support for Gogs (and maybe other git platforms)? It'd be awesome for those of us using different setups for local coding.
Just a thought - it could make the tool even more useful for a bunch of us! Let me know if you need any more info or if you want to bounce around ideas on how to implement this.
Thanks for considering it! π
Potential Solutions
-
We could create a new module for handling different git platforms. Something like
git_platform_handler.pythat detects the platform from the URL and uses the appropriate API. -
For Gogs specifically, we could use their API (similar to GitHub's). Here's a link to Gogs API docs: https://github.com/gogs/docs-api
-
We might want to look at how other projects handle multiple git platforms. For example, GitLab's CI/CD system supports multiple git providers: https://docs.gitlab.com/ee/ci/ci_cd_for_external_repos/
-
Another approach could be to use a library like PyGithub (https://github.com/PyGithub/PyGithub) as a reference to create a "PyGogs" library that we can integrate.
Here's a quick diagram of how it might work:
[User Input URL] -> [URL Parser] -> [Platform Detector]
|
.--------------------.--------------------.
| | |
[GitHub Handler] [Gogs Handler] [GitLab Handler]
| | |
'--------------------.--------------------.
|
[Data Processor]
Just a thought - it could make the tool even more useful for a bunch of us! Let me know if you need any more info or if you want to bounce around ideas on how to implement this.
Thanks for considering it! π
Hi @x66ccff. Thank you for this suggestion and the work you put into possible solutions. There is also #756, which goes in this direction. GitHub is currently the only supported option because it is the most widespread and because this is what the SWE-bench benchmark uses that the efficacy of SWE-agent was evaluated on.
SWE-agent is, at its core, a research project that aims to be simple and easy to hack, as well as easy to maintain, because we only have limited personpower available. Even in the most perfect implementation, supporting additional platforms will come with additional maintenance work, shifting away the focus from the actual core of the project (which is to understand agents and learn about the capabilities of LMs).
So here's what I think we should do instead: If you want to have support for certain platforms, can we have support for simple plugins (i.e.,. separately hosted python packages that enable support) or make it easier to wrap around SWE-agent and make it easier to call it as a python library? I think this is the direction to go into, because it will also address other instances of technical debt that SWE-agent has (like the fact that it's still not properly packaged, sigh).
In any case: Let's discuss the solution here first.
Got this working with GitLab in my homelab. I wired swe-agent through CI so Issues drive the automation end-to-end (Issue β Branch β MR).
Wrote up the details here if itβs useful: Learning to Automate My Side Projects with SWE-agent + GitLab
Still learning, so itβs not perfect, but happy to share what worked for me if there is interest.
Got this working with GitLab in my homelab. I wired swe-agent through CI so Issues drive the automation end-to-end (Issue β Branch β MR).
Wrote up the details here if itβs useful: Learning to Automate My Side Projects with SWE-agent + GitLab
Still learning, so itβs not perfect, but happy to share what worked for me if there is interest.
Interesting way to solve this. will have to give it a try