-
Notifications
You must be signed in to change notification settings - Fork 7.8k
[Bug, GitHub]: fix missing context in cloud resolver #10517
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
Merged
Merged
Conversation
This file contains hidden or 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
…ed templates - Add get_issue_comments() method to fetch issue comments - Add get_issue_title_and_body() method to get issue details - Add get_review_thread_comments() method for PR review threads - Consolidate GitHub templates: issue_prompt.j2 and issue_conversation_instructions.j2 - Enhanced PR update template with review thread context - Remove deprecated template files
malhotra5
commented
Aug 25, 2025
- Implements method to retrieve comments from a review thread by thread_id - Thread consists of root comment and all its replies in chronological order - Handles edge cases like non-existent thread IDs gracefully - Tested with real GitHub API data from PR #10517 Co-authored-by: openhands <openhands@all-hands.dev>
- Replace REST API approach with GraphQL for proper review thread filtering - Add pr_review_thread_comments_graphql_query to queries.py - Update method to accept GraphQL thread ID (string) instead of comment ID (int) - Method now correctly retrieves all comments within a specific review thread - Tested with actual review thread PRRT_kwDOLfkiw85YgBi- containing 3 comments - Handles edge cases and maintains backward compatibility with Comment objects Co-authored-by: openhands <openhands@all-hands.dev>
- Changed method signature to only accept comment_id parameter - Added new GraphQL query get_thread_from_comment_graphql_query - Implemented iterative traversal of reply chain to collect all thread comments - Uses existing execute_graphql_query method for consistency - Returns complete thread sorted by creation date - Includes duplicate prevention and infinite loop protection - Fixed mypy type annotation for current_comment_id Co-authored-by: openhands <openhands@all-hands.dev>
- Removed unnecessary duplicate prevention logic since we traverse linearly up the chain - Removed visited_ids set as infinite loops are not possible in a linear chain - Simplified while loop condition to just check current_comment_id - Loop naturally terminates when replyTo is null (root comment reached) Co-authored-by: openhands <openhands@all-hands.dev>
- Add new GraphQL queries for getting review threads and thread comments - Rewrite get_review_thread_comments to use existing query first, then traverse to root comment if replyTo exists - Add new queries to get all review threads and find matching thread by comment ID - Retrieve all comments from thread with pagination support - Include databaseId in GraphQL queries for proper comment ID handling - Add helper method _convert_comments_to_objects for code reuse - Update method signature to include owner, repo, pr_number parameters - Fix mypy type errors by using separate variable names for GraphQL variables Co-authored-by: openhands <openhands@all-hands.dev>
- Update get_review_threads_graphql_query to support pagination with first/after parameters - Add pageInfo with hasNextPage and endCursor to GraphQL query response - Modify get_review_thread_comments method to paginate through all review threads - Continue searching across pages until the matching thread is found - Ensures all review threads are checked, not just the first 10 Co-authored-by: openhands <openhands@all-hands.dev>
- Handle case where replyTo field is None instead of accessing it directly - Use .get() method to safely check for replyTo existence - Prevents TypeError when comment has no parent reply Co-authored-by: openhands <openhands@all-hands.dev>
rbren
reviewed
Aug 26, 2025
rbren
approved these changes
Aug 26, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
End-user friendly description of the problem this fixes or functionality this introduces.
Summarize what the PR does, explaining any non-trivial design decisions.
This PR does the following
Fixes ALL-2905
@malhotra5 can click here to continue refining the PR
To run this PR locally, use the following command:
GUI with Docker:
CLI with uvx: