MCPcopy Create free account
hub / github.com/Flagsmith/flagsmith / fetch_repositories

Function fetch_repositories

api/integrations/github/views.py:247–267  ·  view source on GitHub ↗
(request, organisation_pk: int)

Source from the content-addressed store, hash-verified

245@permission_classes([IsAuthenticated, GithubIsAdminOrganisation])
246@github_api_call_error_handler(error="Failed to retrieve GitHub repositories.")
247def fetch_repositories(request, organisation_pk: int) -> Response | None: # type: ignore[no-untyped-def]
248 query_serializer = PaginatedQueryParamsSerializer(data=request.query_params)
249 if not query_serializer.is_valid():
250 return Response({"error": query_serializer.errors}, status=400)
251 installation_id = request.GET.get("installation_id")
252
253 if not installation_id:
254 return Response(
255 data={"detail": "Missing installation_id parameter"},
256 content_type="application/json",
257 status=status.HTTP_400_BAD_REQUEST,
258 )
259
260 data = fetch_github_repositories(
261 installation_id=installation_id, params=query_serializer.validated_data
262 )
263 return Response(
264 data=data,
265 content_type="application/json",
266 status=status.HTTP_200_OK,
267 )
268
269
270@api_view(["GET"])

Callers

nothing calls this directly

Calls 4

is_validMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…