(request, organisation_pk)
| 204 | @github_auth_required # type: ignore[misc] |
| 205 | @github_api_call_error_handler(error="Failed to retrieve GitHub pull requests.") |
| 206 | def fetch_pull_requests(request, organisation_pk) -> Response: # type: ignore[no-untyped-def] |
| 207 | query_serializer = IssueQueryParamsSerializer(data=request.query_params) |
| 208 | if not query_serializer.is_valid(): |
| 209 | return Response({"error": query_serializer.errors}, status=400) |
| 210 | |
| 211 | data = fetch_search_github_resource( |
| 212 | resource_type=ResourceType.PULL_REQUESTS, |
| 213 | organisation_id=organisation_pk, |
| 214 | params=query_serializer.validated_data, |
| 215 | ) |
| 216 | return Response( |
| 217 | data=data, |
| 218 | content_type="application/json", |
| 219 | status=status.HTTP_200_OK, |
| 220 | ) |
| 221 | |
| 222 | |
| 223 | @api_view(["GET"]) |
nothing calls this directly
no test coverage detected
searching dependent graphs…