-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
1 parent
451494c
commit 3db785a
Showing
10 changed files
with
170 additions
and
101 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
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 |
---|---|---|
|
@@ -13,4 +13,4 @@ function deactivate() {} | |
module.exports = { | ||
activate, | ||
deactivate | ||
} | ||
} |
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 |
---|---|---|
|
@@ -20,4 +20,4 @@ | |
"title": "Hello World from OpenHands" | ||
}] | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -145,4 +145,4 @@ async def get_suggested_tasks( | |
return JSONResponse( | ||
content=str(e), | ||
status_code=500, | ||
) | ||
) |
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,32 @@ | ||
import asyncio | ||
import os | ||
from pydantic import SecretStr | ||
|
||
from openhands.integrations.github.github_service import GitHubService | ||
|
||
async def main(): | ||
token = SecretStr(os.environ.get('GITHUB_TOKEN', '')) | ||
service = GitHubService(token=token) | ||
|
||
print("Getting user info...") | ||
user = await service.get_user() | ||
print(f"Authenticated as: {user.login}") | ||
|
||
print("\nFetching recent repositories...") | ||
repos = await service.get_repositories(page=1, per_page=10, sort="pushed", installation_id=None) | ||
print(f"Found {len(repos)} repositories:") | ||
for repo in repos: | ||
print(f"- {repo.full_name}") | ||
|
||
print("\nFetching suggested tasks...") | ||
tasks = await service.get_suggested_tasks() | ||
|
||
print("\nFound tasks:") | ||
if not tasks: | ||
print("No tasks found") | ||
for task in tasks: | ||
print(f"\n{task.task_type} in {task.repo}:") | ||
print(f"#{task.issue_number}: {task.title}") | ||
|
||
if __name__ == "__main__": | ||
asyncio.run(main()) |
Oops, something went wrong.