forked from All-Hands-AI/OpenHands
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
57 additions
and
30 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -61,7 +61,7 @@ Follow these steps to use this workflow in your own repository: | |
2. Create a draft PR if successful, or push a branch if unsuccessful | ||
3. Comment on the issue with the results | ||
|
||
Need help? Feel free to [open an issue](https://github.com/all-hands-ai/openhands-resolver/issues) or email us at [[email protected]](mailto:[email protected]). | ||
Need help? Feel free to [open an issue](https://github.com/all-hands-ai/openhands/issues) or email us at [[email protected]](mailto:[email protected]). | ||
|
||
## Manual Installation | ||
|
||
|
@@ -111,15 +111,15 @@ python -m openhands.resolver.resolve_issue --repo [OWNER]/[REPO] --issue-number | |
For instance, if you want to resolve issue #100 in this repo, you would run: | ||
|
||
```bash | ||
python -m openhands.resolver.resolve_issue --repo all-hands-ai/openhands-resolver --issue-number 100 | ||
python -m openhands.resolver.resolve_issue --repo all-hands-ai/openhands --issue-number 100 | ||
``` | ||
|
||
The output will be written to the `output/` directory. | ||
|
||
If you've installed the package from source using poetry, you can use: | ||
|
||
```bash | ||
poetry run python openhands/resolver/resolve_issue.py --repo all-hands-ai/openhands-resolver --issue-number 100 | ||
poetry run python openhands/resolver/resolve_issue.py --repo all-hands-ai/openhands --issue-number 100 | ||
``` | ||
|
||
For resolving multiple issues at once (e.g., in a batch process), you can use the `resolve_all_issues` command: | ||
|
@@ -131,7 +131,7 @@ python -m openhands.resolver.resolve_all_issues --repo [OWNER]/[REPO] --issue-nu | |
For example: | ||
|
||
```bash | ||
python -m openhands.resolver.resolve_all_issues --repo all-hands-ai/openhands-resolver --issue-numbers 100,101,102 | ||
python -m openhands.resolver.resolve_all_issues --repo all-hands-ai/openhands --issue-numbers 100,101,102 | ||
``` | ||
|
||
## Responding to PR Comments | ||
|
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
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from enum import Enum | ||
|
||
from termcolor import colored | ||
|
||
|
||
class TermColor(Enum): | ||
"""Terminal color codes.""" | ||
|
||
WARNING = 'yellow' | ||
SUCCESS = 'green' | ||
ERROR = 'red' | ||
INFO = 'blue' | ||
|
||
|
||
def colorize(text: str, color: TermColor = TermColor.WARNING) -> str: | ||
"""Colorize text with specified color. | ||
Args: | ||
text (str): Text to be colored | ||
color (TermColor, optional): Color to use. Defaults to TermColor.WARNING | ||
Returns: | ||
str: Colored text | ||
""" | ||
return colored(text, color.value) |