Skip to content

times

Accessed as client.repos.issues.times; the async client mirrors it.

ReposIssuesTimes

The repos.issues.times namespace.

add

add(
    owner: str, repo: str, index: int, *, created: datetime | None = None, time: int, user_name: str | None = None
) -> TrackedTime

Add tracked time to a issue.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
index int

index of the issue

required
created datetime | None
None
time int

time in seconds

required
user_name str | None

User who spent the time (optional)

None

Returns:

Type Description
TrackedTime

TrackedTime.

Raises:

Type Description
BadRequestError
  1. APIError is error format response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: issueAddTime

delete

delete(owner: str, repo: str, index: int, id: int) -> None

Delete specific tracked time.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
index int

index of the issue

required
id int

id of time to delete

required

Returns:

Type Description
None

No content.

Raises:

Type Description
BadRequestError
  1. APIError is error format response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: issueDeleteTime

list

list(
    owner: str,
    repo: str,
    index: int,
    *,
    user: str | None = None,
    since: datetime | None = None,
    before: datetime | None = None,
    page: int | None = None,
    limit: int | None = None,
) -> Paginated[TrackedTime]

List an issue's tracked times.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
index int

index of the issue

required
user str | None

optional filter by user (available for issue managers)

None
since datetime | None

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

None
before datetime | None

Only show times 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[TrackedTime]

TrackedTimeList.

Raises:

Type Description
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: issueTrackedTimes

reset

reset(owner: str, repo: str, index: int) -> None

Reset a tracked time of an issue.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
index int

index of the issue to add tracked time to

required

Returns:

Type Description
None

No content.

Raises:

Type Description
BadRequestError
  1. APIError is error format response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: issueResetTime

AsyncReposIssuesTimes

The repos.issues.times namespace.

add

add(
    owner: str, repo: str, index: int, *, created: datetime | None = None, time: int, user_name: str | None = None
) -> TrackedTime

Add tracked time to a issue.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
index int

index of the issue

required
created datetime | None
None
time int

time in seconds

required
user_name str | None

User who spent the time (optional)

None

Returns:

Type Description
TrackedTime

TrackedTime.

Raises:

Type Description
BadRequestError
  1. APIError is error format response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: issueAddTime

delete

delete(owner: str, repo: str, index: int, id: int) -> None

Delete specific tracked time.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
index int

index of the issue

required
id int

id of time to delete

required

Returns:

Type Description
None

No content.

Raises:

Type Description
BadRequestError
  1. APIError is error format response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: issueDeleteTime

list

list(
    owner: str,
    repo: str,
    index: int,
    *,
    user: str | None = None,
    since: datetime | None = None,
    before: datetime | None = None,
    page: int | None = None,
    limit: int | None = None,
) -> AsyncPaginated[TrackedTime]

List an issue's tracked times.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
index int

index of the issue

required
user str | None

optional filter by user (available for issue managers)

None
since datetime | None

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

None
before datetime | None

Only show times 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[TrackedTime]

TrackedTimeList.

Raises:

Type Description
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: issueTrackedTimes

reset

reset(owner: str, repo: str, index: int) -> None

Reset a tracked time of an issue.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
index int

index of the issue to add tracked time to

required

Returns:

Type Description
None

No content.

Raises:

Type Description
BadRequestError
  1. APIError is error format response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: issueResetTime