@@ -232,11 +232,17 @@ def _calculate_language_stats(self, repos: list) -> Dict[str, float]:
232232 def _search_items (self , query : str , per_page : int = 5 ) -> Dict [str , Any ]:
233233 """Search issues and PRs using GitHub CLI search command."""
234234 try :
235+ # Determine search type based on query
236+ search_type = 'prs' if 'is:pr' in query else 'issues'
237+
238+ # Remove is:pr/issue from query as it's implied by search type
239+ query = query .replace ('is:pr ' , '' ).replace ('is:issue ' , '' )
240+
235241 # Parse query string and convert to command-line flags
236242 flags = self ._parse_search_query (query )
237243
238244 # Build command with proper flags
239- cmd = ['gh' , 'search' , 'issues' ] + flags + [
245+ cmd = ['gh' , 'search' , search_type ] + flags + [
240246 '--limit' , str (per_page ),
241247 '--json' , 'number,title,repository,url,state'
242248 ]
@@ -293,9 +299,9 @@ def _parse_search_query(self, query: str) -> list:
293299 flags .extend (['--state' , value ])
294300 elif key == 'is' :
295301 # Handle is:pr and is:issue
296- if value == 'pr' :
297- flags . append ( '--include-prs' )
298- # is:issue is default, no flag needed
302+ # For prs search, we don't need this flag
303+ # For issues search, is:issue is default
304+ pass
299305 else :
300306 # For other qualifiers, add as search term
301307 flags .append (part )
0 commit comments