-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
[Feat]: Adding endpoint for suggested tasks Openhands could tackle #6844
Conversation
At a quick look, this looks like it would work locally, but I'm not sure. Could you please confirm or not? Just curious, how did OpenHands agent test, in what setup? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One issue I'm realizing here is that we don't have a repo list sorted by pushed_at
, so we don't know which repos to focus on :/
Any ideas on how to retrieve the top 5 most relevant repos that the user has connected? When I connect my personal acct with ~500 repos, openhands really struggles
I wonder if another option is to do this query across all repos, looking for PRs owned by the user, or issues assigned to them |
This PR has been updated as follows
I also had openhands write a small script to test whether this would output the expected data and it worked well import asyncio
import os
from pydantic import SecretStr
from openhands.integrations.github.github_service import GitHubService
async def main():
token = SecretStr(os.environ['GITHUB_TOKEN'])
service = GitHubService(token=token)
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()) and it output the following data
cc @enyst |
End-user friendly description of the problem this fixes or functionality that this introduces
Give a summary of what the PR does, explaining any non-trivial design decisions
This PR only adds an endpoint in our backend for "suggested tasks" we could display on the frontend. Suggested tasks are those we'd like to proactively request permission from the user to resolve using Openhands. The UI for this is still undecided.
We use graphql here because we want to make the fetching process as efficient as possible (minimize number of requests).
I had Openhands test this endpoint and a sample output is included below
Link of any specific issues this addresses
To run this PR locally, use the following command: