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

Function fetch_github_repositories

api/integrations/github/client.py:226–249  ·  view source on GitHub ↗
(
    installation_id: str,
    params: PaginatedQueryParams,
)

Source from the content-addressed store, hash-verified

224
225
226def fetch_github_repositories(
227 installation_id: str,
228 params: PaginatedQueryParams,
229) -> dict[str, Any]:
230 url = (
231 f"{GITHUB_API_URL}installation/repositories?"
232 + f"&per_page={params.page_size}&page={params.page}"
233 )
234
235 headers: dict[str, str] = build_request_headers(installation_id)
236
237 response = requests.get(url, headers=headers, timeout=GITHUB_API_CALLS_TIMEOUT)
238 json_response = response.json()
239 response.raise_for_status()
240 results = [
241 {
242 "full_name": i["full_name"],
243 "id": i["id"],
244 "name": i["name"],
245 }
246 for i in json_response["repositories"]
247 ]
248
249 return build_paginated_response(results, response, json_response["total_count"])
250
251
252def get_github_issue_pr_title_and_state(

Callers 1

fetch_repositoriesFunction · 0.90

Calls 5

build_request_headersFunction · 0.85
build_paginated_responseFunction · 0.85
getMethod · 0.45
jsonMethod · 0.45
raise_for_statusMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…