-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat: GitLab support with tests #1034
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
base: main
Are you sure you want to change the base?
Conversation
Hi @jpaodev ! Thank you for this PR. I see lots of changes, it will take me a while to review this in detail. Really appreciate that its well tested! So here's what I think from top of my head:
Regarding 2) In @classmethod
def from_config(cls, config: RunSingleConfig) -> Self:
....
if config.actions.open_pr:
self.logger.debug("Adding OpenPRHook")
if isinstance(config.repo, GitHub...)
self.add_hook(OpenPRHook(config.actions.pr_config))
elif isinstance(config.repo, GitLab...)
self.add_hook(...)
return self So tl;dr: I'm happy to merge anything that doesn't increase the complexity of what we have and that can simply live in a separate class/file. This is true for the |
Totally agree! I haven't noticed how big the file has gotten, phew! 😄 Tested both the GitHub issue / GitLab issue combinations manually (the hello world example from your repository and the one I placed on GitLab) Let me know if the changes are fine! |
Sorry that I didn't have time to merge this yet. I'll need to review again, but it might happen only after the NEURIPS deadline. We were working a lot on https://swesmith.com/ and had to prioritize this over supporting other platforms. That being said, I think the basic support for gitlab repos is great (the PR thing yes, if it doesn't add more complexity). |
@klieret no worries - I spotted some problems and I will test everything by hand again, because we also plan to use and present this. Very greatful for the solution overall. Will comment if everything also works fine with subgroups! |
@klieret ok now LGTM, tested with normal groups and subgroups (Docker ReX Deployment) and also ran jobs within GitLab CI jobs (Local ReX Deployment) The only thing that is in the PR that bothers me is the Merge Request creation: It has no retry logic -> on my Lmk if you spot anything that's wrong! :) |
Reference Issues/PRs
See also #220 #209 #162
What does this implement/fix? Explain your changes.
This issue implements GitLab Support. A previous Merge Request has existed, however used the
python-gitlab
library. To keep the setup minimal, the already existingrequests
library has been used in this version.Additionally tests have been added to ensure functionality, as previously requested.
The Merge Requests aims to achieve GitLab support, motivated by the fact, that many developers use GitLab as an alternative solution to GitHub. Through this feature those developers can test SWE-Agent on their repositories as well.
I hope the changes are satisfactory and apologize for the huge delay to the first Merge Request! Once again big thanks for making this available for everyone to use!