Module aiogithubapi.models.repository

GitHub response data class.

Expand source code
"""GitHub response data class."""
from __future__ import annotations

from typing import Any, Dict

from .base import GitHubDataModelBase
from .license import GitHubLicenseModel
from .organization import GitHubOrganizationModel
from .owner import GitHubOwnerModel
from .permissions import GitHubPermissionsModel


class GitHubRepositoryModel(GitHubDataModelBase):
    """GitHub repository data class."""

    archive_url: str | None = None
    allow_squash_merge: bool | None = None
    allow_merge_commit: bool | None = None
    allow_rebase_merge: bool | None = None
    allow_auto_merge: bool | None = None
    delete_branch_on_merge: bool | None = None
    archived: bool | None = None
    assignees_url: str | None = None
    blobs_url: str | None = None
    branches_url: str | None = None
    clone_url: str | None = None
    collaborators_url: str | None = None
    comments_url: str | None = None
    commits_url: str | None = None
    compare_url: str | None = None
    contents_url: str | None = None
    contributors_url: str | None = None
    created_at: str | None = None
    default_branch: str | None = None
    deployments_url: str | None = None
    description: str | None = None
    disabled: bool | None = None
    downloads_url: str | None = None
    events_url: str | None = None
    fork: bool | None = None
    forks_count: int | None = None
    forks_url: str | None = None
    forks: int | None = None
    full_name: str | None = None
    git_commits_url: str | None = None
    git_refs_url: str | None = None
    git_tags_url: str | None = None
    git_url: str | None = None
    has_downloads: bool | None = None
    has_issues: bool | None = None
    has_pages: bool | None = None
    has_projects: bool | None = None
    has_wiki: bool | None = None
    homepage: str | None = None
    hooks_url: str | None = None
    html_url: str | None = None
    id: int | None = None
    issue_comment_url: str | None = None
    issue_events_url: str | None = None
    issues_url: str | None = None
    keys_url: str | None = None
    labels_url: str | None = None
    language: str | None = None
    languages_url: str | None = None
    license: GitHubLicenseModel | None = None
    merges_url: str | None = None
    milestones_url: str | None = None
    mirror_url: str | None = None
    name: str | None = None
    network_count: int | None = None
    node_id: str | None = None
    notifications_url: str | None = None
    open_issues_count: int | None = None
    open_issues: int | None = None
    organization: GitHubOrganizationModel | None = None
    owner: GitHubOwnerModel | None = None
    permissions: GitHubPermissionsModel | None = None
    private: bool | None = None
    pulls_url: str | None = None
    pushed_at: str | None = None
    releases_url: str | None = None
    size: int | None = None
    ssh_url: str | None = None
    stargazers_count: int | None = None
    stargazers_url: str | None = None
    statuses_url: str | None = None
    subscribers_count: int | None = None
    subscribers_url: str | None = None
    subscription_url: str | None = None
    svn_url: str | None = None
    tags_url: str | None = None
    teams_url: str | None = None
    temp_clone_token: str | None = None
    topics: list[str] | None = None
    trees_url: str | None = None
    updated_at: str | None = None
    url: str | None = None
    watchers_count: int | None = None
    watchers: int | None = None

    def _generate_license(self, data: Dict[str, Any] | None) -> GitHubLicenseModel:
        """Generate a license model from a dictionary."""
        return GitHubLicenseModel(data) if data else None

    def _generate_owner(self, data: Dict[str, Any] | None) -> GitHubOwnerModel:
        """Generate an owner model from a dictionary."""
        return GitHubOwnerModel(data) if data else None

    def _generate_permissions(self, data: Dict[str, Any] | None) -> GitHubPermissionsModel:
        """Generate a permissions model from a dictionary."""
        return GitHubPermissionsModel(data)

    def _generate_organization(self, data: Dict[str, Any] | None) -> GitHubOrganizationModel:
        """Generate an organization model from a dictionary."""
        return GitHubOrganizationModel(data)

Classes

class GitHubRepositoryModel (data: Dict[str, Any])

GitHub repository data class.

Init.

Expand source code
class GitHubRepositoryModel(GitHubDataModelBase):
    """GitHub repository data class."""

    archive_url: str | None = None
    allow_squash_merge: bool | None = None
    allow_merge_commit: bool | None = None
    allow_rebase_merge: bool | None = None
    allow_auto_merge: bool | None = None
    delete_branch_on_merge: bool | None = None
    archived: bool | None = None
    assignees_url: str | None = None
    blobs_url: str | None = None
    branches_url: str | None = None
    clone_url: str | None = None
    collaborators_url: str | None = None
    comments_url: str | None = None
    commits_url: str | None = None
    compare_url: str | None = None
    contents_url: str | None = None
    contributors_url: str | None = None
    created_at: str | None = None
    default_branch: str | None = None
    deployments_url: str | None = None
    description: str | None = None
    disabled: bool | None = None
    downloads_url: str | None = None
    events_url: str | None = None
    fork: bool | None = None
    forks_count: int | None = None
    forks_url: str | None = None
    forks: int | None = None
    full_name: str | None = None
    git_commits_url: str | None = None
    git_refs_url: str | None = None
    git_tags_url: str | None = None
    git_url: str | None = None
    has_downloads: bool | None = None
    has_issues: bool | None = None
    has_pages: bool | None = None
    has_projects: bool | None = None
    has_wiki: bool | None = None
    homepage: str | None = None
    hooks_url: str | None = None
    html_url: str | None = None
    id: int | None = None
    issue_comment_url: str | None = None
    issue_events_url: str | None = None
    issues_url: str | None = None
    keys_url: str | None = None
    labels_url: str | None = None
    language: str | None = None
    languages_url: str | None = None
    license: GitHubLicenseModel | None = None
    merges_url: str | None = None
    milestones_url: str | None = None
    mirror_url: str | None = None
    name: str | None = None
    network_count: int | None = None
    node_id: str | None = None
    notifications_url: str | None = None
    open_issues_count: int | None = None
    open_issues: int | None = None
    organization: GitHubOrganizationModel | None = None
    owner: GitHubOwnerModel | None = None
    permissions: GitHubPermissionsModel | None = None
    private: bool | None = None
    pulls_url: str | None = None
    pushed_at: str | None = None
    releases_url: str | None = None
    size: int | None = None
    ssh_url: str | None = None
    stargazers_count: int | None = None
    stargazers_url: str | None = None
    statuses_url: str | None = None
    subscribers_count: int | None = None
    subscribers_url: str | None = None
    subscription_url: str | None = None
    svn_url: str | None = None
    tags_url: str | None = None
    teams_url: str | None = None
    temp_clone_token: str | None = None
    topics: list[str] | None = None
    trees_url: str | None = None
    updated_at: str | None = None
    url: str | None = None
    watchers_count: int | None = None
    watchers: int | None = None

    def _generate_license(self, data: Dict[str, Any] | None) -> GitHubLicenseModel:
        """Generate a license model from a dictionary."""
        return GitHubLicenseModel(data) if data else None

    def _generate_owner(self, data: Dict[str, Any] | None) -> GitHubOwnerModel:
        """Generate an owner model from a dictionary."""
        return GitHubOwnerModel(data) if data else None

    def _generate_permissions(self, data: Dict[str, Any] | None) -> GitHubPermissionsModel:
        """Generate a permissions model from a dictionary."""
        return GitHubPermissionsModel(data)

    def _generate_organization(self, data: Dict[str, Any] | None) -> GitHubOrganizationModel:
        """Generate an organization model from a dictionary."""
        return GitHubOrganizationModel(data)

Ancestors

Class variables

var allow_auto_merge : bool | None
var allow_merge_commit : bool | None
var allow_rebase_merge : bool | None
var allow_squash_merge : bool | None
var archive_url : str | None
var archived : bool | None
var assignees_url : str | None
var blobs_url : str | None
var branches_url : str | None
var clone_url : str | None
var collaborators_url : str | None
var comments_url : str | None
var commits_url : str | None
var compare_url : str | None
var contents_url : str | None
var contributors_url : str | None
var created_at : str | None
var default_branch : str | None
var delete_branch_on_merge : bool | None
var deployments_url : str | None
var description : str | None
var disabled : bool | None
var downloads_url : str | None
var events_url : str | None
var fork : bool | None
var forks : int | None
var forks_count : int | None
var forks_url : str | None
var full_name : str | None
var git_commits_url : str | None
var git_refs_url : str | None
var git_tags_url : str | None
var git_url : str | None
var has_downloads : bool | None
var has_issues : bool | None
var has_pages : bool | None
var has_projects : bool | None
var has_wiki : bool | None
var homepage : str | None
var hooks_url : str | None
var html_url : str | None
var id : int | None
var issue_comment_url : str | None
var issue_events_url : str | None
var issues_url : str | None
var keys_url : str | None
var labels_url : str | None
var language : str | None
var languages_url : str | None
var license : GitHubLicenseModel | None
var merges_url : str | None
var milestones_url : str | None
var mirror_url : str | None
var name : str | None
var network_count : int | None
var node_id : str | None
var notifications_url : str | None
var open_issues : int | None
var open_issues_count : int | None
var organization : GitHubOrganizationModel | None
var owner : GitHubOwnerModel | None
var permissions : GitHubPermissionsModel | None
var private : bool | None
var pulls_url : str | None
var pushed_at : str | None
var releases_url : str | None
var size : int | None
var ssh_url : str | None
var stargazers_count : int | None
var stargazers_url : str | None
var statuses_url : str | None
var subscribers_count : int | None
var subscribers_url : str | None
var subscription_url : str | None
var svn_url : str | None
var tags_url : str | None
var teams_url : str | None
var temp_clone_token : str | None
var topics : list[str] | None
var trees_url : str | None
var updated_at : str | None
var url : str | None
var watchers : int | None
var watchers_count : int | None

Inherited members