comments
Accessed as client.repos.issues.comments; the async client mirrors it.
ReposIssuesComments
The repos.issues.comments namespace.
create
create(owner: str, repo: str, index: int, *, body: str, updated_at: datetime | None = None) -> Comment
Add a comment to 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 |
required |
body
|
str
|
The body of the comment |
required |
updated_at
|
datetime | None
|
The time of the comment's update, needs admin or repository owner permission |
None
|
Returns:
| Type | Description |
|---|---|
Comment
|
Comment. |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
NotFoundError
|
|
LockedError
|
|
ServerError
|
|
Operation ID: issueCreateComment
delete
delete(owner: str, repo: str, id: int) -> None
Delete a comment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of comment to delete |
required |
Returns:
| Type | Description |
|---|---|
None
|
No content. |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
ServerError
|
|
Operation ID: issueDeleteComment
delete_for_issue
delete_for_issue(owner: str, repo: str, index: int, id: int) -> None
Delete a comment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
this parameter is ignored |
required |
id
|
int
|
id of comment to delete |
required |
Returns:
| Type | Description |
|---|---|
None
|
No content. |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
ServerError
|
|
Deprecated
Deprecated in the vendored Spec; generated for compatibility.
Operation ID: issueDeleteCommentDeprecated
get
get(owner: str, repo: str, id: int) -> Comment | None
Get a comment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of the comment |
required |
Returns:
| Type | Description |
|---|---|
Comment | None
|
Comment. |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
NotFoundError
|
|
ServerError
|
|
Operation ID: issueGetComment
list
list(
owner: str, repo: str, index: int, *, since: datetime | None = None, before: datetime | None = None
) -> list[Comment]
List all comments on 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 |
required |
since
|
datetime | None
|
if provided, only comments updated since the specified time are returned. |
None
|
before
|
datetime | None
|
if provided, only comments updated before the provided time are returned. |
None
|
Returns:
| Type | Description |
|---|---|
list[Comment]
|
CommentList. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
UnprocessableEntityError
|
|
ServerError
|
|
Operation ID: issueGetComments
list_all
list_all(
owner: str,
repo: str,
*,
since: datetime | None = None,
before: datetime | None = None,
page: int | None = None,
limit: int | None = None,
) -> Paginated[Comment]
List all comments in a repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
since
|
datetime | None
|
if provided, only comments updated since the provided time are returned. |
None
|
before
|
datetime | None
|
if provided, only comments updated before the provided time are returned. |
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[Comment]
|
CommentList. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
UnprocessableEntityError
|
|
ServerError
|
|
Operation ID: issueGetRepoComments
update
update(owner: str, repo: str, id: int, *, body: str, updated_at: datetime | None = None) -> Comment | None
Edit a comment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of the comment to edit |
required |
body
|
str
|
The body of the comment |
required |
updated_at
|
datetime | None
|
The time of the comment's update, needs admin or repository owner permission |
None
|
Returns:
| Type | Description |
|---|---|
Comment | None
|
Comment. |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
NotFoundError
|
|
LockedError
|
|
ServerError
|
|
Operation ID: issueEditComment
update_for_issue
update_for_issue(
owner: str, repo: str, index: int, id: int, *, body: str, updated_at: datetime | None = None
) -> Comment | None
Edit a comment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
this parameter is ignored |
required |
id
|
int
|
id of the comment to edit |
required |
body
|
str
|
The body of the comment |
required |
updated_at
|
datetime | None
|
The time of the comment's update, needs admin or repository owner permission |
None
|
Returns:
| Type | Description |
|---|---|
Comment | None
|
Comment. |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
NotFoundError
|
|
ServerError
|
|
Deprecated
Deprecated in the vendored Spec; generated for compatibility.
Operation ID: issueEditCommentDeprecated
AsyncReposIssuesComments
The repos.issues.comments namespace.
create
create(owner: str, repo: str, index: int, *, body: str, updated_at: datetime | None = None) -> Comment
Add a comment to 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 |
required |
body
|
str
|
The body of the comment |
required |
updated_at
|
datetime | None
|
The time of the comment's update, needs admin or repository owner permission |
None
|
Returns:
| Type | Description |
|---|---|
Comment
|
Comment. |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
NotFoundError
|
|
LockedError
|
|
ServerError
|
|
Operation ID: issueCreateComment
delete
delete(owner: str, repo: str, id: int) -> None
Delete a comment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of comment to delete |
required |
Returns:
| Type | Description |
|---|---|
None
|
No content. |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
ServerError
|
|
Operation ID: issueDeleteComment
delete_for_issue
delete_for_issue(owner: str, repo: str, index: int, id: int) -> None
Delete a comment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
this parameter is ignored |
required |
id
|
int
|
id of comment to delete |
required |
Returns:
| Type | Description |
|---|---|
None
|
No content. |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
ServerError
|
|
Deprecated
Deprecated in the vendored Spec; generated for compatibility.
Operation ID: issueDeleteCommentDeprecated
get
get(owner: str, repo: str, id: int) -> Comment | None
Get a comment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of the comment |
required |
Returns:
| Type | Description |
|---|---|
Comment | None
|
Comment. |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
NotFoundError
|
|
ServerError
|
|
Operation ID: issueGetComment
list
list(
owner: str, repo: str, index: int, *, since: datetime | None = None, before: datetime | None = None
) -> list[Comment]
List all comments on 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 |
required |
since
|
datetime | None
|
if provided, only comments updated since the specified time are returned. |
None
|
before
|
datetime | None
|
if provided, only comments updated before the provided time are returned. |
None
|
Returns:
| Type | Description |
|---|---|
list[Comment]
|
CommentList. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
UnprocessableEntityError
|
|
ServerError
|
|
Operation ID: issueGetComments
list_all
list_all(
owner: str,
repo: str,
*,
since: datetime | None = None,
before: datetime | None = None,
page: int | None = None,
limit: int | None = None,
) -> AsyncPaginated[Comment]
List all comments in a repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
since
|
datetime | None
|
if provided, only comments updated since the provided time are returned. |
None
|
before
|
datetime | None
|
if provided, only comments updated before the provided time are returned. |
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[Comment]
|
CommentList. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
UnprocessableEntityError
|
|
ServerError
|
|
Operation ID: issueGetRepoComments
update
update(owner: str, repo: str, id: int, *, body: str, updated_at: datetime | None = None) -> Comment | None
Edit a comment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of the comment to edit |
required |
body
|
str
|
The body of the comment |
required |
updated_at
|
datetime | None
|
The time of the comment's update, needs admin or repository owner permission |
None
|
Returns:
| Type | Description |
|---|---|
Comment | None
|
Comment. |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
NotFoundError
|
|
LockedError
|
|
ServerError
|
|
Operation ID: issueEditComment
update_for_issue
update_for_issue(
owner: str, repo: str, index: int, id: int, *, body: str, updated_at: datetime | None = None
) -> Comment | None
Edit a comment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
this parameter is ignored |
required |
id
|
int
|
id of the comment to edit |
required |
body
|
str
|
The body of the comment |
required |
updated_at
|
datetime | None
|
The time of the comment's update, needs admin or repository owner permission |
None
|
Returns:
| Type | Description |
|---|---|
Comment | None
|
Comment. |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
NotFoundError
|
|
ServerError
|
|
Deprecated
Deprecated in the vendored Spec; generated for compatibility.
Operation ID: issueEditCommentDeprecated