github_search_engine.clients.github_client_manager

Module Contents

class GithubClientManager(access_token)[source]

A GithubClientManager to handle interactions with the GitHub API.

Initializes a GitHub API client manager.

Parameters:

access_token (str) – The personal access token used to authenticate with the GitHub API.

github_client[source]
async get_repository_issues(owner, repository_name)[source]

Retrieve issues from a specified GitHub repository.

This function connects to a given GitHub repository and retrieves a list of issues using the GitHub API client. It returns a paginated list of issues associated with the repository.

Parameters:
  • owner (str) – The owner of the repository from which to retrieve issues.

  • repository_name (str) – The name of the repository from which to retrieve

  • issues.

Returns:

A paginated list of issues retrieved from the specified repository.

Return type:

list[githubkit.versions.v2022_11_28.models.Issue]

get_issue_comments(owner, repository_name, issue_number)[source]

Retrieve comments for a specific issue in a repository.

Parameters:
  • owner (str) – The owner of the repository.

  • repository_name (str) – The name of the repository.

  • issue_number (int) – The number of the issue.

Returns:

A list of comments for the specified issue.

Return type:

list[githubkit.versions.v2022_11_28.models.IssueComment]

get_issue_references(owner, repository_name, issue_number)[source]

Fetch mentions to a given issue.

Fetches the timeline events for a specific issue and filters out the cross-referenced events. This returns a list of the other issues mentioning the current issue.

Parameters:
  • owner (str) – The owner of the repository.

  • repository_name (str) – The name of the repository.

  • issue_number (int) – The number of the issue.

Returns:

A list of cross-referenced events.

Return type:

list[githubkit.versions.v2022_11_28.models.TimelineCrossReferencedEvent]