Skip to content

comments

Accessed as client.repos.pulls.reviews.comments; the async client mirrors it.

ReposPullsReviewsComments

The repos.pulls.reviews.comments namespace.

create

create(
    owner: str,
    repo: str,
    index: int,
    id: int,
    *,
    body: str | None = None,
    extra_lines_count: int | None = None,
    new_position: int | None = None,
    old_position: int | None = None,
    path: str | None = None,
) -> PullReviewComment

Add a new comment to a pull request review.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
index int

index of the pull request

required
id int

id of the review

required
body str | None
None
extra_lines_count int | None

number of additional lines after the commented line (0 = single line comment)

None
new_position int | None

if comment to new file line or 0

None
old_position int | None

if comment to old file line or 0

None
path str | None

the tree path

None

Returns:

Type Description
PullReviewComment

PullComment.

Raises:

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

Operation ID: repoCreatePullReviewComment

delete

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

Delete a pull review comment.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
index int

index of the pull request

required
id int

id of the review

required
comment int

id of the comment

required

Returns:

Type Description
None

No content.

Raises:

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

Operation ID: repoDeletePullReviewComment

get

get(owner: str, repo: str, index: int, id: int, comment: int) -> PullReviewComment

Get a pull review comment.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
index int

index of the pull request

required
id int

id of the review

required
comment int

id of the comment

required

Returns:

Type Description
PullReviewComment

PullComment.

Raises:

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

Operation ID: repoGetPullReviewComment

list

list(owner: str, repo: str, index: int, id: int) -> list[PullReviewComment]

Get a specific review for a pull request.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
index int

index of the pull request

required
id int

id of the review

required

Returns:

Type Description
list[PullReviewComment]

PullCommentList.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: repoGetPullReviewComments

AsyncReposPullsReviewsComments

The repos.pulls.reviews.comments namespace.

create

create(
    owner: str,
    repo: str,
    index: int,
    id: int,
    *,
    body: str | None = None,
    extra_lines_count: int | None = None,
    new_position: int | None = None,
    old_position: int | None = None,
    path: str | None = None,
) -> PullReviewComment

Add a new comment to a pull request review.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
index int

index of the pull request

required
id int

id of the review

required
body str | None
None
extra_lines_count int | None

number of additional lines after the commented line (0 = single line comment)

None
new_position int | None

if comment to new file line or 0

None
old_position int | None

if comment to old file line or 0

None
path str | None

the tree path

None

Returns:

Type Description
PullReviewComment

PullComment.

Raises:

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

Operation ID: repoCreatePullReviewComment

delete

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

Delete a pull review comment.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
index int

index of the pull request

required
id int

id of the review

required
comment int

id of the comment

required

Returns:

Type Description
None

No content.

Raises:

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

Operation ID: repoDeletePullReviewComment

get

get(owner: str, repo: str, index: int, id: int, comment: int) -> PullReviewComment

Get a pull review comment.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
index int

index of the pull request

required
id int

id of the review

required
comment int

id of the comment

required

Returns:

Type Description
PullReviewComment

PullComment.

Raises:

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

Operation ID: repoGetPullReviewComment

list

list(owner: str, repo: str, index: int, id: int) -> list[PullReviewComment]

Get a specific review for a pull request.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
index int

index of the pull request

required
id int

id of the review

required

Returns:

Type Description
list[PullReviewComment]

PullCommentList.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: repoGetPullReviewComments