Skip to content

notifications

Accessed as client.repos.notifications; the async client mirrors it.

ReposNotifications

The repos.notifications namespace.

list

list(
    owner: str,
    repo: str,
    *,
    all: bool | None = None,
    status_types: list[str] | None = None,
    subject_type: list[Literal["issue", "pull", "repository"]] | None = None,
    since: datetime | None = None,
    before: datetime | None = None,
    page: int | None = None,
    limit: int | None = None,
) -> Paginated[NotificationThread]

List users's notification threads on a specific repo.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
all bool | None

If true, show notifications marked as read. Default value is false

None
status_types list[str] | None

Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned

None
subject_type list[Literal['issue', 'pull', 'repository']] | None

filter notifications by subject type

None
since datetime | None

Only show notifications updated after the given time. This is a timestamp in RFC 3339 format

None
before datetime | None

Only show notifications updated before the given time. This is a timestamp in RFC 3339 format

None
page int | None

1-based page to start iteration at.

None
limit int | None

Page size; the instance caps it server-side.

None

Returns:

Type Description
Paginated[NotificationThread]

NotificationThreadList.

Operation ID: notifyGetRepoList

update

update(
    owner: str,
    repo: str,
    *,
    all: bool | None = None,
    status_types: list[str] | None = None,
    to_status: str | None = None,
    last_read_at: datetime | None = None,
) -> None

Mark notification threads as read, pinned or unread on a specific repo.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
all bool | None

If true, mark all notifications on this repo. Default value is false

None
status_types list[str] | None

Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.

None
to_status str | None

Status to mark notifications as. Defaults to read.

None
last_read_at datetime | None

Describes the last point that notifications were checked. Anything updated since this time will not be updated.

None

Returns:

Type Description
None

No content.

Operation ID: notifyReadRepoList

AsyncReposNotifications

The repos.notifications namespace.

list

list(
    owner: str,
    repo: str,
    *,
    all: bool | None = None,
    status_types: list[str] | None = None,
    subject_type: list[Literal["issue", "pull", "repository"]] | None = None,
    since: datetime | None = None,
    before: datetime | None = None,
    page: int | None = None,
    limit: int | None = None,
) -> AsyncPaginated[NotificationThread]

List users's notification threads on a specific repo.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
all bool | None

If true, show notifications marked as read. Default value is false

None
status_types list[str] | None

Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned

None
subject_type list[Literal['issue', 'pull', 'repository']] | None

filter notifications by subject type

None
since datetime | None

Only show notifications updated after the given time. This is a timestamp in RFC 3339 format

None
before datetime | None

Only show notifications updated before the given time. This is a timestamp in RFC 3339 format

None
page int | None

1-based page to start iteration at.

None
limit int | None

Page size; the instance caps it server-side.

None

Returns:

Type Description
AsyncPaginated[NotificationThread]

NotificationThreadList.

Operation ID: notifyGetRepoList

update

update(
    owner: str,
    repo: str,
    *,
    all: bool | None = None,
    status_types: list[str] | None = None,
    to_status: str | None = None,
    last_read_at: datetime | None = None,
) -> None

Mark notification threads as read, pinned or unread on a specific repo.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
all bool | None

If true, mark all notifications on this repo. Default value is false

None
status_types list[str] | None

Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.

None
to_status str | None

Status to mark notifications as. Defaults to read.

None
last_read_at datetime | None

Describes the last point that notifications were checked. Anything updated since this time will not be updated.

None

Returns:

Type Description
None

No content.

Operation ID: notifyReadRepoList