This repository was archived by the owner on Jun 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
graphql_api/types/repository Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -265,19 +265,12 @@ def resolve_repository_result_type(obj: Any, *_: Any) -> Optional[str]:
265265def resolve_is_first_pull_request (
266266 repository : Repository , info : GraphQLResolveInfo
267267) -> bool :
268- try :
269- # Get at most 2 PRs to determine if there's only one
270- pull_requests = repository .pull_requests .values ("id" , "compared_to" )[:2 ]
271- if len (pull_requests ) != 1 :
272- return False
273- # For single PR, check if it's a valid first PR by verifying no compared_to
274- return pull_requests [0 ]["compared_to" ] is None
275- except Exception as e :
276- log .error (
277- "Error checking is_first_pull_request, assuming False" ,
278- extra = dict (repo_id = repository .repoid , error = str (e )),
279- )
268+ # Get at most 2 PRs to determine if there's only one
269+ pull_requests = repository .pull_requests .values ("id" , "compared_to" )[:2 ]
270+ if len (pull_requests ) != 1 :
280271 return False
272+ # For single PR, check if it's a valid first PR by verifying no compared_to
273+ return pull_requests [0 ]["compared_to" ] is None
281274
282275
283276@repository_bindable .field ("isGithubRateLimited" )
You can’t perform that action at this time.
0 commit comments