post_comment_for_pull_request
(**kwargs)¶Posts a comment on a pull request.
See also: AWS API Documentation
Request Syntax
response = client.post_comment_for_pull_request(
pullRequestId='string',
repositoryName='string',
beforeCommitId='string',
afterCommitId='string',
location={
'filePath': 'string',
'filePosition': 123,
'relativeFileVersion': 'BEFORE'|'AFTER'
},
content='string',
clientRequestToken='string'
)
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests.
[REQUIRED]
The name of the repository where you want to post a comment on a pull request.
[REQUIRED]
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.
[REQUIRED]
The full commit ID of the commit in the source branch that is the current tip of the branch for the pull request when you post the comment.
The location of the change where you want to post your comment. If no location is provided, the comment is posted as a general comment on the pull request difference between the before commit ID and the after commit ID.
The name of the file being compared, including its extension and subdirectory, if any.
The position of a change in a compared file, in line number format.
In a comparison of commits or a pull request, whether the change is in the before or after of that comparison.
[REQUIRED]
The content of your comment on the change.
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.
This field is autopopulated if not provided.
dict
Response Syntax
{
'repositoryName': 'string',
'pullRequestId': 'string',
'beforeCommitId': 'string',
'afterCommitId': 'string',
'beforeBlobId': 'string',
'afterBlobId': 'string',
'location': {
'filePath': 'string',
'filePosition': 123,
'relativeFileVersion': 'BEFORE'|'AFTER'
},
'comment': {
'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
}
}
}
Response Structure
(dict) --
repositoryName (string) --
The name of the repository where you posted a comment on a pull request.
pullRequestId (string) --
The system-generated ID of the pull request.
beforeCommitId (string) --
The full commit ID of the commit in the source branch used to create the pull request, or in the case of an updated pull request, the full commit ID of the commit used to update the pull request.
afterCommitId (string) --
The full commit ID of the commit in the destination branch where the pull request is merged.
beforeBlobId (string) --
In the directionality of the pull request, the blob ID of the before blob.
afterBlobId (string) --
In the directionality of the pull request, the blob ID of the after blob.
location (dict) --
The location of the change where you posted your comment.
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.
comment (dict) --
The content of the comment you posted.
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.
reactionCounts (dict) --
A string to integer map that represents the number of individual users who have responded to a comment with the specified reactions.
Exceptions
CodeCommit.Client.exceptions.PullRequestDoesNotExistException
CodeCommit.Client.exceptions.InvalidPullRequestIdException
CodeCommit.Client.exceptions.PullRequestIdRequiredException
CodeCommit.Client.exceptions.RepositoryNotAssociatedWithPullRequestException
CodeCommit.Client.exceptions.RepositoryNameRequiredException
CodeCommit.Client.exceptions.RepositoryDoesNotExistException
CodeCommit.Client.exceptions.InvalidRepositoryNameException
CodeCommit.Client.exceptions.ClientRequestTokenRequiredException
CodeCommit.Client.exceptions.InvalidClientRequestTokenException
CodeCommit.Client.exceptions.IdempotencyParameterMismatchException
CodeCommit.Client.exceptions.CommentContentRequiredException
CodeCommit.Client.exceptions.CommentContentSizeLimitExceededException
CodeCommit.Client.exceptions.InvalidFileLocationException
CodeCommit.Client.exceptions.InvalidRelativeFileVersionEnumException
CodeCommit.Client.exceptions.PathRequiredException
CodeCommit.Client.exceptions.InvalidFilePositionException
CodeCommit.Client.exceptions.CommitIdRequiredException
CodeCommit.Client.exceptions.InvalidCommitIdException
CodeCommit.Client.exceptions.BeforeCommitIdAndAfterCommitIdAreSameException
CodeCommit.Client.exceptions.EncryptionIntegrityChecksFailedException
CodeCommit.Client.exceptions.EncryptionKeyAccessDeniedException
CodeCommit.Client.exceptions.EncryptionKeyDisabledException
CodeCommit.Client.exceptions.EncryptionKeyNotFoundException
CodeCommit.Client.exceptions.EncryptionKeyUnavailableException
CodeCommit.Client.exceptions.CommitDoesNotExistException
CodeCommit.Client.exceptions.InvalidPathException
CodeCommit.Client.exceptions.PathDoesNotExistException
CodeCommit.Client.exceptions.PathRequiredException