CodeCommit / Client / get_comments_for_pull_request
get_comments_for_pull_request#
- CodeCommit.Client.get_comments_for_pull_request(**kwargs)#
Returns comments made on a pull request.
Note
Reaction counts might include numbers from user identities who were deleted after the reaction was made. For a count of reactions from active identities, use GetCommentReactions.
See also: AWS API Documentation
Request Syntax
response = client.get_comments_for_pull_request( pullRequestId='string', repositoryName='string', beforeCommitId='string', afterCommitId='string', nextToken='string', maxResults=123 )
- Parameters:
pullRequestId (string) –
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests.
repositoryName (string) – The name of the repository that contains the pull request.
beforeCommitId (string) – The full commit ID of the commit in the destination branch that was the tip of the branch at the time the pull request was created.
afterCommitId (string) – The full commit ID of the commit in the source branch that was the tip of the branch at the time the comment was made.
nextToken (string) – An enumeration token that, when provided in a request, returns the next batch of the results.
maxResults (integer) – A non-zero, non-negative integer used to limit the number of returned results. The default is 100 comments. You can return up to 500 comments with a single request.
- Return type:
dict
- Returns:
Response Syntax
{ 'commentsForPullRequestData': [ { 'pullRequestId': 'string', 'repositoryName': 'string', 'beforeCommitId': 'string', 'afterCommitId': 'string', 'beforeBlobId': 'string', 'afterBlobId': 'string', 'location': { 'filePath': 'string', 'filePosition': 123, 'relativeFileVersion': 'BEFORE'|'AFTER' }, 'comments': [ { 'commentId': 'string', 'content': 'string', 'inReplyTo': 'string', 'creationDate': datetime(2015, 1, 1), 'lastModifiedDate': datetime(2015, 1, 1), 'authorArn': 'string', 'deleted': True|False, 'clientRequestToken': 'string', 'callerReactions': [ 'string', ], 'reactionCounts': { 'string': 123 } }, ] }, ], 'nextToken': 'string' }
Response Structure
(dict) –
commentsForPullRequestData (list) –
An array of comment objects on the pull request.
(dict) –
Returns information about comments on a pull request.
pullRequestId (string) –
The system-generated ID of the pull request.
repositoryName (string) –
The name of the repository that contains the pull request.
beforeCommitId (string) –
The full commit ID of the commit that was the tip of the destination branch when the pull request was created. This commit is superceded by the after commit in the source branch when and if you merge the source branch into the destination branch.
afterCommitId (string) –
The full commit ID of the commit that was the tip of the source branch at the time the comment was made.
beforeBlobId (string) –
The full blob ID of the file on which you want to comment on the destination commit.
afterBlobId (string) –
The full blob ID of the file on which you want to comment on the source commit.
location (dict) –
Location information about the comment on the pull request, including the file name, line number, and whether the version of the file where the comment was made is BEFORE (destination branch) or AFTER (source branch).
filePath (string) –
The name of the file being compared, including its extension and subdirectory, if any.
filePosition (integer) –
The position of a change in a compared file, in line number format.
relativeFileVersion (string) –
In a comparison of commits or a pull request, whether the change is in the before or after of that comparison.
comments (list) –
An array of comment objects. Each comment object contains information about a comment on the pull request.
(dict) –
Returns information about a specific comment.
commentId (string) –
The system-generated comment ID.
content (string) –
The content of the comment.
inReplyTo (string) –
The ID of the comment for which this comment is a reply, if any.
creationDate (datetime) –
The date and time the comment was created, in timestamp format.
lastModifiedDate (datetime) –
The date and time the comment was most recently modified, in timestamp format.
authorArn (string) –
The Amazon Resource Name (ARN) of the person who posted the comment.
deleted (boolean) –
A Boolean value indicating whether the comment has been deleted.
clientRequestToken (string) –
A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request returns information about the initial request that used that token.
callerReactions (list) –
The emoji reactions to a comment, if any, submitted by the user whose credentials are associated with the call to the API.
(string) –
reactionCounts (dict) –
A string to integer map that represents the number of individual users who have responded to a comment with the specified reactions.
(string) –
(integer) –
nextToken (string) –
An enumeration token that can be used in a request to return the next batch of the results.
Exceptions
CodeCommit.Client.exceptions.PullRequestIdRequiredException
CodeCommit.Client.exceptions.PullRequestDoesNotExistException
CodeCommit.Client.exceptions.InvalidPullRequestIdException
CodeCommit.Client.exceptions.RepositoryNameRequiredException
CodeCommit.Client.exceptions.RepositoryDoesNotExistException
CodeCommit.Client.exceptions.InvalidRepositoryNameException
CodeCommit.Client.exceptions.CommitIdRequiredException
CodeCommit.Client.exceptions.InvalidCommitIdException
CodeCommit.Client.exceptions.CommitDoesNotExistException
CodeCommit.Client.exceptions.InvalidMaxResultsException
CodeCommit.Client.exceptions.InvalidContinuationTokenException
CodeCommit.Client.exceptions.RepositoryNotAssociatedWithPullRequestException
CodeCommit.Client.exceptions.EncryptionIntegrityChecksFailedException
CodeCommit.Client.exceptions.EncryptionKeyAccessDeniedException
CodeCommit.Client.exceptions.EncryptionKeyDisabledException
CodeCommit.Client.exceptions.EncryptionKeyNotFoundException
CodeCommit.Client.exceptions.EncryptionKeyUnavailableException