bridge.services.github.github_ingestor module#

Async client for the GitHub API. Fetches a repository and returns the raw JSON (single call).

class bridge.services.github.github_ingestor.GitHubIngestor(owner, repo)[source]#

Bases: Ingestor

Ingest GitHub repository metadata via the GitHub REST API (raw JSON).

Parameters:
  • owner (str)

  • repo (str)

async fetch()[source]#

Fetch the full repository object (single endpoint).

Returns:

Raw JSON for the repository from GET /repos/{owner}/{repo}.

Return type:

dict

async fetch_github_pages()[source]#

Fetch the GitHub Pages information for the repository.

Returns:

Raw JSON for the GitHub Pages from GET /repos/{owner}/{repo}/pages.

Return type:

dict

async fetch_languages()[source]#

Fetch the programming languages used in the repository.

Returns:

Raw JSON for the languages from GET /repos/{owner}/{repo}/languages.

Return type:

dict | None

async fetch_latest_release()[source]#

Fetch the latest release (raw JSON) or return None if the repo has no releases.

Returns:

Latest release JSON, or None when GitHub returns 404 (no releases).

Return type:

dict | None

async fetch_readme()[source]#

Fetch the README content (decoded) or return None if not found.

Returns:

Decoded README content, or None if not found.

Return type:

str | None

async fetch_repo()[source]#

Fetch the full repository object (raw JSON).

Returns:

Raw JSON for the repository from GET /repos/{owner}/{repo}.

Return type:

dict

async get_user(username)[source]#

Fetch a GitHub user by username.

Parameters:

username (str) – GitHub username.

Returns:

Raw JSON for the user from GET /users/{username}.

Return type:

dict