π OpenHands: AI-Driven Development
hotfix(backend): Exclude open PRs when fetching suggested tasks (#7912)
sp.wackd270476d6cc7
diff --git a/openhands/integrations/github/github_service.py b/openhands/integrations/github/github_service.pyindex 9e66873ad3..c91865039b 100644--- a/openhands/integrations/github/github_service.py+++ b/openhands/integrations/github/github_service.py@@ -312,7 +312,7 @@ class GitHubService(GitService):for pr in data['pullRequests']['nodes']:repo_name = pr['repository']['nameWithOwner']- # Always add open PRs+ # Start with default task typetask_type = TaskType.OPEN_PR# Check for specific states@@ -333,14 +333,16 @@ class GitHubService(GitService):):task_type = TaskType.UNRESOLVED_COMMENTS- tasks.append(- SuggestedTask(- task_type=task_type,- repo=repo_name,- issue_number=pr['number'],- title=pr['title'],+ # Only add the task if it's not OPEN_PR+ if task_type != TaskType.OPEN_PR:+ tasks.append(+ SuggestedTask(+ task_type=task_type,+ repo=repo_name,+ issue_number=pr['number'],+ title=pr['title'],+ ))- )# Process issuesfor issue in data['issues']['nodes']: