-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(resolver): implement gitlab resolver (#6458)
Signed-off-by: José Luis Di Biase <[email protected]> Co-authored-by: José Luis Di Biase <[email protected]> Co-authored-by: Oriana <[email protected]> Co-authored-by: Charlie <[email protected]> Co-authored-by: Juan Manuel Daza <[email protected]> Co-authored-by: Juan Manuel Daza <[email protected]> Co-authored-by: Cody Kociemba <[email protected]> Co-authored-by: Rohit Malhotra <[email protected]> Co-authored-by: Engel Nyst <[email protected]>
- Loading branch information
1 parent
ef12bc5
commit f5fccab
Showing
29 changed files
with
6,685 additions
and
1,298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# OpenHands Github Issue Resolver 🙌 | ||
# OpenHands Github & Gitlab Issue Resolver 🙌 | ||
|
||
Need help resolving a GitHub issue but don't have the time to do it yourself? Let an AI agent help you out! | ||
|
||
|
@@ -74,14 +74,24 @@ If you prefer to run the resolver programmatically instead of using GitHub Actio | |
pip install openhands-ai | ||
``` | ||
|
||
2. Create a GitHub access token: | ||
- Visit [GitHub's token settings](https://github.com/settings/personal-access-tokens/new) | ||
- Create a fine-grained token with these scopes: | ||
- "Content" | ||
- "Pull requests" | ||
- "Issues" | ||
- "Workflows" | ||
- If you don't have push access to the target repo, you can fork it first | ||
2. Create a GitHub or GitLab access token: | ||
- Create a GitHub acces token | ||
- Visit [GitHub's token settings](https://github.com/settings/personal-access-tokens/new) | ||
- Create a fine-grained token with these scopes: | ||
- "Content" | ||
- "Pull requests" | ||
- "Issues" | ||
- "Workflows" | ||
- If you don't have push access to the target repo, you can fork it first | ||
|
||
- Create a GitLab acces token | ||
- Visit [GitLab's token settings](https://gitlab.com/-/user_settings/personal_access_tokens) | ||
- Create a fine-grained token with these scopes: | ||
- 'api' | ||
- 'read_api' | ||
- 'read_user' | ||
- 'read_repository' | ||
- 'write_repository' | ||
|
||
3. Set up environment variables: | ||
|
||
|
@@ -90,7 +100,12 @@ pip install openhands-ai | |
# GitHub credentials | ||
|
||
export GITHUB_TOKEN="your-github-token" | ||
export GITHUB_USERNAME="your-github-username" # Optional, defaults to token owner | ||
export GIT_USERNAME="your-github-username" # Optional, defaults to token owner | ||
|
||
# GitLab credentials if you're using GitLab repo | ||
|
||
export GITLAB_TOKEN="your-gitlab-token" | ||
export GIT_USERNAME="your-gitlab-username" # Optional, defaults to token owner | ||
|
||
# LLM configuration | ||
|
||
|
@@ -169,13 +184,13 @@ There are three ways you can upload: | |
3. `ready` - create a non-draft PR that's ready for review | ||
|
||
```bash | ||
python -m openhands.resolver.send_pull_request --issue-number ISSUE_NUMBER --github-username YOUR_GITHUB_USERNAME --pr-type draft | ||
python -m openhands.resolver.send_pull_request --issue-number ISSUE_NUMBER --username YOUR_GITHUB_OR_GITLAB_USERNAME --pr-type draft | ||
``` | ||
|
||
If you want to upload to a fork, you can do so by specifying the `fork-owner`: | ||
|
||
```bash | ||
python -m openhands.resolver.send_pull_request --issue-number ISSUE_NUMBER --github-username YOUR_GITHUB_USERNAME --pr-type draft --fork-owner YOUR_GITHUB_USERNAME | ||
python -m openhands.resolver.send_pull_request --issue-number ISSUE_NUMBER --username YOUR_GITHUB_OR_GITLAB_USERNAME --pr-type draft --fork-owner YOUR_GITHUB_OR_GITLAB_USERNAME | ||
``` | ||
|
||
## Providing Custom Instructions | ||
|
@@ -184,5 +199,5 @@ You can customize how the AI agent approaches issue resolution by adding a `.ope | |
|
||
## Troubleshooting | ||
|
||
If you have any issues, please open an issue on this github repo, we're happy to help! | ||
If you have any issues, please open an issue on this github or gitlab repo, we're happy to help! | ||
Alternatively, you can [email us](mailto:[email protected]) or join the OpenHands Slack workspace (see [the README](/README.md) for an invite link). |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.