2017/11/20 - AWS CodeCommit - 17 new api methods
Changes Update codecommit client to latest version
Gets information about a pull request in a specified repository.
See also: AWS API Documentation
Request Syntax
client.get_pull_request( pullRequestId='string' )
string
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests.
dict
Response Syntax
{ 'pullRequest': { 'pullRequestId': 'string', 'title': 'string', 'description': 'string', 'lastActivityDate': datetime(2015, 1, 1), 'creationDate': datetime(2015, 1, 1), 'pullRequestStatus': 'OPEN'|'CLOSED', 'authorArn': 'string', 'pullRequestTargets': [ { 'repositoryName': 'string', 'sourceReference': 'string', 'destinationReference': 'string', 'destinationCommit': 'string', 'sourceCommit': 'string', 'mergeMetadata': { 'isMerged': True|False, 'mergedBy': 'string' } }, ], 'clientRequestToken': 'string' } }
Response Structure
(dict) --
pullRequest (dict) --
Information about the specified pull request.
pullRequestId (string) --
The system-generated ID of the pull request.
title (string) --
The user-defined title of the pull request. This title is displayed in the list of pull requests to other users of the repository.
description (string) --
The user-defined description of the pull request. This description can be used to clarify what should be reviewed and other details of the request.
lastActivityDate (datetime) --
The day and time of the last user or system activity on the pull request, in timestamp format.
creationDate (datetime) --
The date and time the pull request was originally created, in timestamp format.
pullRequestStatus (string) --
The status of the pull request. Pull request status can only change from OPEN to CLOSED.
authorArn (string) --
The Amazon Resource Name (ARN) of the user who created the pull request.
pullRequestTargets (list) --
The targets of the pull request, including the source branch and destination branch for the pull request.
(dict) --
Returns information about a pull request target.
repositoryName (string) --
The name of the repository that contains the pull request source and destination branches.
sourceReference (string) --
The branch of the repository that contains the changes for the pull request. Also known as the source branch.
destinationReference (string) --
The branch of the repository where the pull request changes will be merged into. Also known as the destination branch.
destinationCommit (string) --
The full commit ID that is the tip of the destination branch. This is the commit where the pull request was or will be merged.
sourceCommit (string) --
The full commit ID of the tip of the source branch used to create the pull request. If the pull request branch is updated by a push while the pull request is open, the commit ID will change to reflect the new tip of the branch.
mergeMetadata (dict) --
Returns metadata about the state of the merge, including whether the merge has been made.
isMerged (boolean) --
A Boolean value indicating whether the merge has been made.
mergedBy (string) --
The Amazon Resource Name (ARN) of the user who merged the branches.
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 will return information about the initial request that used that token.
Posts a comment on a pull request.
See also: AWS API Documentation
Request Syntax
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' )
string
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests.
string
[REQUIRED]
The name of the repository where you want to post a comment on a pull request.
string
[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.
string
[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.
dict
The location of the change where you want to post your comment. If no location is provided, the comment will be posted as a general comment on the pull request difference between the before commit ID and the after commit ID.
filePath (string) --
The name of the file being compared, including its extension and subdirectory, if any.
filePosition (integer) --
The position of a change within 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.
string
[REQUIRED]
The content of your comment on the change.
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 will return 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' } }
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 will be 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 within 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 will return information about the initial request that used that token.
Closes a pull request and attempts to merge the source commit of a pull request into the specified destination branch for that pull request at the specified commit using the fast-forward merge option.
See also: AWS API Documentation
Request Syntax
client.merge_pull_request_by_fast_forward( pullRequestId='string', repositoryName='string', sourceCommitId='string' )
string
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests.
string
[REQUIRED]
The name of the repository where the pull request was created.
string
The full commit ID of the original or updated commit in the pull request source branch. Pass this value if you want an exception thrown if the current commit ID of the tip of the source branch does not match this commit ID.
dict
Response Syntax
{ 'pullRequest': { 'pullRequestId': 'string', 'title': 'string', 'description': 'string', 'lastActivityDate': datetime(2015, 1, 1), 'creationDate': datetime(2015, 1, 1), 'pullRequestStatus': 'OPEN'|'CLOSED', 'authorArn': 'string', 'pullRequestTargets': [ { 'repositoryName': 'string', 'sourceReference': 'string', 'destinationReference': 'string', 'destinationCommit': 'string', 'sourceCommit': 'string', 'mergeMetadata': { 'isMerged': True|False, 'mergedBy': 'string' } }, ], 'clientRequestToken': 'string' } }
Response Structure
(dict) --
pullRequest (dict) --
Information about the specified pull request, including information about the merge.
pullRequestId (string) --
The system-generated ID of the pull request.
title (string) --
The user-defined title of the pull request. This title is displayed in the list of pull requests to other users of the repository.
description (string) --
The user-defined description of the pull request. This description can be used to clarify what should be reviewed and other details of the request.
lastActivityDate (datetime) --
The day and time of the last user or system activity on the pull request, in timestamp format.
creationDate (datetime) --
The date and time the pull request was originally created, in timestamp format.
pullRequestStatus (string) --
The status of the pull request. Pull request status can only change from OPEN to CLOSED.
authorArn (string) --
The Amazon Resource Name (ARN) of the user who created the pull request.
pullRequestTargets (list) --
The targets of the pull request, including the source branch and destination branch for the pull request.
(dict) --
Returns information about a pull request target.
repositoryName (string) --
The name of the repository that contains the pull request source and destination branches.
sourceReference (string) --
The branch of the repository that contains the changes for the pull request. Also known as the source branch.
destinationReference (string) --
The branch of the repository where the pull request changes will be merged into. Also known as the destination branch.
destinationCommit (string) --
The full commit ID that is the tip of the destination branch. This is the commit where the pull request was or will be merged.
sourceCommit (string) --
The full commit ID of the tip of the source branch used to create the pull request. If the pull request branch is updated by a push while the pull request is open, the commit ID will change to reflect the new tip of the branch.
mergeMetadata (dict) --
Returns metadata about the state of the merge, including whether the merge has been made.
isMerged (boolean) --
A Boolean value indicating whether the merge has been made.
mergedBy (string) --
The Amazon Resource Name (ARN) of the user who merged the branches.
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 will return information about the initial request that used that token.
Returns the content of a comment made on a change, file, or commit in a repository.
See also: AWS API Documentation
Request Syntax
client.get_comment( commentId='string' )
string
[REQUIRED]
The unique, system-generated ID of the comment. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest.
dict
Response Syntax
{ 'comment': { 'commentId': 'string', 'content': 'string', 'inReplyTo': 'string', 'creationDate': datetime(2015, 1, 1), 'lastModifiedDate': datetime(2015, 1, 1), 'authorArn': 'string', 'deleted': True|False, 'clientRequestToken': 'string' } }
Response Structure
(dict) --
comment (dict) --
The contents of the 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 will return information about the initial request that used that token.
Returns information about comments made on the comparison between two commits.
See also: AWS API Documentation
Request Syntax
client.get_comments_for_compared_commit( repositoryName='string', beforeCommitId='string', afterCommitId='string', nextToken='string', maxResults=123 )
string
[REQUIRED]
The name of the repository where you want to compare commits.
string
To establish the directionality of the comparison, the full commit ID of the 'before' commit.
string
[REQUIRED]
To establish the directionality of the comparison, the full commit ID of the 'after' commit.
string
An enumeration token that when provided in a request, returns the next batch of the results.
integer
A non-negative integer used to limit the number of returned results. The default is 100 comments, and is configurable up to 500.
dict
Response Syntax
{ 'commentsForComparedCommitData': [ { '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' }, ] }, ], 'nextToken': 'string' }
Response Structure
(dict) --
commentsForComparedCommitData (list) --
A list of comment objects on the compared commit.
(dict) --
Returns information about comments on the comparison between two commits.
repositoryName (string) --
The name of the repository that contains the compared commits.
beforeCommitId (string) --
The full commit ID of the commit used to establish the 'before' of the comparison.
afterCommitId (string) --
The full commit ID of the commit used to establish the 'after' of the comparison.
beforeBlobId (string) --
The full blob ID of the commit used to establish the 'before' of the comparison.
afterBlobId (string) --
The full blob ID of the commit used to establish the 'after' of the comparison.
location (dict) --
Location information about the comment on the comparison, including the file name, line number, and whether the version of the file where the comment was made is 'BEFORE' or 'AFTER'.
filePath (string) --
The name of the file being compared, including its extension and subdirectory, if any.
filePosition (integer) --
The position of a change within 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 comparison between commits.
(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 will return information about the initial request that used that token.
nextToken (string) --
An enumeration token that can be used in a request to return the next batch of the results.
Updates the status of a pull request.
See also: AWS API Documentation
Request Syntax
client.update_pull_request_status( pullRequestId='string', pullRequestStatus='OPEN'|'CLOSED' )
string
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests.
string
[REQUIRED]
The status of the pull request. The only valid operations are to update the status from OPEN to OPEN, OPEN to CLOSED or from from CLOSED to CLOSED.
dict
Response Syntax
{ 'pullRequest': { 'pullRequestId': 'string', 'title': 'string', 'description': 'string', 'lastActivityDate': datetime(2015, 1, 1), 'creationDate': datetime(2015, 1, 1), 'pullRequestStatus': 'OPEN'|'CLOSED', 'authorArn': 'string', 'pullRequestTargets': [ { 'repositoryName': 'string', 'sourceReference': 'string', 'destinationReference': 'string', 'destinationCommit': 'string', 'sourceCommit': 'string', 'mergeMetadata': { 'isMerged': True|False, 'mergedBy': 'string' } }, ], 'clientRequestToken': 'string' } }
Response Structure
(dict) --
pullRequest (dict) --
Information about the pull request.
pullRequestId (string) --
The system-generated ID of the pull request.
title (string) --
The user-defined title of the pull request. This title is displayed in the list of pull requests to other users of the repository.
description (string) --
The user-defined description of the pull request. This description can be used to clarify what should be reviewed and other details of the request.
lastActivityDate (datetime) --
The day and time of the last user or system activity on the pull request, in timestamp format.
creationDate (datetime) --
The date and time the pull request was originally created, in timestamp format.
pullRequestStatus (string) --
The status of the pull request. Pull request status can only change from OPEN to CLOSED.
authorArn (string) --
The Amazon Resource Name (ARN) of the user who created the pull request.
pullRequestTargets (list) --
The targets of the pull request, including the source branch and destination branch for the pull request.
(dict) --
Returns information about a pull request target.
repositoryName (string) --
The name of the repository that contains the pull request source and destination branches.
sourceReference (string) --
The branch of the repository that contains the changes for the pull request. Also known as the source branch.
destinationReference (string) --
The branch of the repository where the pull request changes will be merged into. Also known as the destination branch.
destinationCommit (string) --
The full commit ID that is the tip of the destination branch. This is the commit where the pull request was or will be merged.
sourceCommit (string) --
The full commit ID of the tip of the source branch used to create the pull request. If the pull request branch is updated by a push while the pull request is open, the commit ID will change to reflect the new tip of the branch.
mergeMetadata (dict) --
Returns metadata about the state of the merge, including whether the merge has been made.
isMerged (boolean) --
A Boolean value indicating whether the merge has been made.
mergedBy (string) --
The Amazon Resource Name (ARN) of the user who merged the branches.
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 will return information about the initial request that used that token.
Returns a list of pull requests for a specified repository. The return list can be refined by pull request status or pull request author ARN.
See also: AWS API Documentation
Request Syntax
client.list_pull_requests( repositoryName='string', authorArn='string', pullRequestStatus='OPEN'|'CLOSED', nextToken='string', maxResults=123 )
string
[REQUIRED]
The name of the repository for which you want to list pull requests.
string
Optional. The Amazon Resource Name (ARN) of the user who created the pull request. If used, this filters the results to pull requests created by that user.
string
Optional. The status of the pull request. If used, this refines the results to the pull requests that match the specified status.
string
An enumeration token that when provided in a request, returns the next batch of the results.
integer
A non-negative integer used to limit the number of returned results.
dict
Response Syntax
{ 'pullRequestIds': [ 'string', ], 'nextToken': 'string' }
Response Structure
(dict) --
pullRequestIds (list) --
The system-generated IDs of the pull requests.
(string) --
nextToken (string) --
An enumeration token that when provided in a request, returns the next batch of the results.
Returns information about one or more pull request events.
See also: AWS API Documentation
Request Syntax
client.describe_pull_request_events( pullRequestId='string', pullRequestEventType='PULL_REQUEST_CREATED'|'PULL_REQUEST_STATUS_CHANGED'|'PULL_REQUEST_SOURCE_REFERENCE_UPDATED'|'PULL_REQUEST_MERGE_STATE_CHANGED', actorArn='string', nextToken='string', maxResults=123 )
string
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests.
string
Optional. The pull request event type about which you want to return information.
string
The Amazon Resource Name (ARN) of the user whose actions resulted in the event. Examples include updating the pull request with additional commits or changing the status of a pull request.
string
An enumeration token that when provided in a request, returns the next batch of the results.
integer
A non-negative integer used to limit the number of returned results. The default is 100 events, which is also the maximum number of events that can be returned in a result.
dict
Response Syntax
{ 'pullRequestEvents': [ { 'pullRequestId': 'string', 'eventDate': datetime(2015, 1, 1), 'pullRequestEventType': 'PULL_REQUEST_CREATED'|'PULL_REQUEST_STATUS_CHANGED'|'PULL_REQUEST_SOURCE_REFERENCE_UPDATED'|'PULL_REQUEST_MERGE_STATE_CHANGED', 'actorArn': 'string', 'pullRequestStatusChangedEventMetadata': { 'pullRequestStatus': 'OPEN'|'CLOSED' }, 'pullRequestSourceReferenceUpdatedEventMetadata': { 'repositoryName': 'string', 'beforeCommitId': 'string', 'afterCommitId': 'string' }, 'pullRequestMergedStateChangedEventMetadata': { 'repositoryName': 'string', 'destinationReference': 'string', 'mergeMetadata': { 'isMerged': True|False, 'mergedBy': 'string' } } }, ], 'nextToken': 'string' }
Response Structure
(dict) --
pullRequestEvents (list) --
Information about the pull request events.
(dict) --
Returns information about a pull request event.
pullRequestId (string) --
The system-generated ID of the pull request.
eventDate (datetime) --
The day and time of the pull request event, in timestamp format.
pullRequestEventType (string) --
The type of the pull request event, for example a status change event (PULL_REQUEST_STATUS_CHANGED) or update event (PULL_REQUEST_SOURCE_REFERENCE_UPDATED).
actorArn (string) --
The Amazon Resource Name (ARN) of the user whose actions resulted in the event. Examples include updating the pull request with additional commits or changing the status of a pull request.
pullRequestStatusChangedEventMetadata (dict) --
Information about the change in status for the pull request event.
pullRequestStatus (string) --
The changed status of the pull request.
pullRequestSourceReferenceUpdatedEventMetadata (dict) --
Information about the updated source branch for the pull request event.
repositoryName (string) --
The name of the repository where the pull request was updated.
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 updated.
afterCommitId (string) --
The full commit ID of the commit in the source branch that was the tip of the branch at the time the pull request was updated.
pullRequestMergedStateChangedEventMetadata (dict) --
Information about the change in mergability state for the pull request event.
repositoryName (string) --
The name of the repository where the pull request was created.
destinationReference (string) --
The name of the branch that the pull request will be merged into.
mergeMetadata (dict) --
Information about the merge state change event.
isMerged (boolean) --
A Boolean value indicating whether the merge has been made.
mergedBy (string) --
The Amazon Resource Name (ARN) of the user who merged the branches.
nextToken (string) --
An enumeration token that can be used in a request to return the next batch of the results.
Replaces the contents of a comment.
See also: AWS API Documentation
Request Syntax
client.update_comment( commentId='string', content='string' )
string
[REQUIRED]
The system-generated ID of the comment you want to update. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest.
string
[REQUIRED]
The updated content with which you want to replace the existing content of the comment.
dict
Response Syntax
{ 'comment': { 'commentId': 'string', 'content': 'string', 'inReplyTo': 'string', 'creationDate': datetime(2015, 1, 1), 'lastModifiedDate': datetime(2015, 1, 1), 'authorArn': 'string', 'deleted': True|False, 'clientRequestToken': 'string' } }
Response Structure
(dict) --
comment (dict) --
Information about the updated 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 will return information about the initial request that used that token.
Posts a comment in reply to an existing comment on a comparison between commits or a pull request.
See also: AWS API Documentation
Request Syntax
client.post_comment_reply( inReplyTo='string', clientRequestToken='string', content='string' )
string
[REQUIRED]
The system-generated ID of the comment to which you want to reply. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest.
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 will return information about the initial request that used that token.
This field is autopopulated if not provided.
string
[REQUIRED]
The contents of your reply to a comment.
dict
Response Syntax
{ 'comment': { 'commentId': 'string', 'content': 'string', 'inReplyTo': 'string', 'creationDate': datetime(2015, 1, 1), 'lastModifiedDate': datetime(2015, 1, 1), 'authorArn': 'string', 'deleted': True|False, 'clientRequestToken': 'string' } }
Response Structure
(dict) --
comment (dict) --
Information about the reply to a 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 will return information about the initial request that used that token.
Creates a pull request in the specified repository.
See also: AWS API Documentation
Request Syntax
client.create_pull_request( title='string', description='string', targets=[ { 'repositoryName': 'string', 'sourceReference': 'string', 'destinationReference': 'string' }, ], clientRequestToken='string' )
string
[REQUIRED]
The title of the pull request. This title will be used to identify the pull request to other users in the repository.
string
A description of the pull request.
list
[REQUIRED]
The targets for the pull request, including the source of the code to be reviewed (the source branch), and the destination where the creator of the pull request intends the code to be merged after the pull request is closed (the destination branch).
(dict) --
Returns information about a target for a pull request.
repositoryName (string) -- [REQUIRED]
The name of the repository that contains the pull request.
sourceReference (string) -- [REQUIRED]
The branch of the repository that contains the changes for the pull request. Also known as the source branch.
destinationReference (string) --
The branch of the repository where the pull request changes will be merged into. Also known as the destination branch.
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 will return information about the initial request that used that token.
This field is autopopulated if not provided.
dict
Response Syntax
{ 'pullRequest': { 'pullRequestId': 'string', 'title': 'string', 'description': 'string', 'lastActivityDate': datetime(2015, 1, 1), 'creationDate': datetime(2015, 1, 1), 'pullRequestStatus': 'OPEN'|'CLOSED', 'authorArn': 'string', 'pullRequestTargets': [ { 'repositoryName': 'string', 'sourceReference': 'string', 'destinationReference': 'string', 'destinationCommit': 'string', 'sourceCommit': 'string', 'mergeMetadata': { 'isMerged': True|False, 'mergedBy': 'string' } }, ], 'clientRequestToken': 'string' } }
Response Structure
(dict) --
pullRequest (dict) --
Information about the newly created pull request.
pullRequestId (string) --
The system-generated ID of the pull request.
title (string) --
The user-defined title of the pull request. This title is displayed in the list of pull requests to other users of the repository.
description (string) --
The user-defined description of the pull request. This description can be used to clarify what should be reviewed and other details of the request.
lastActivityDate (datetime) --
The day and time of the last user or system activity on the pull request, in timestamp format.
creationDate (datetime) --
The date and time the pull request was originally created, in timestamp format.
pullRequestStatus (string) --
The status of the pull request. Pull request status can only change from OPEN to CLOSED.
authorArn (string) --
The Amazon Resource Name (ARN) of the user who created the pull request.
pullRequestTargets (list) --
The targets of the pull request, including the source branch and destination branch for the pull request.
(dict) --
Returns information about a pull request target.
repositoryName (string) --
The name of the repository that contains the pull request source and destination branches.
sourceReference (string) --
The branch of the repository that contains the changes for the pull request. Also known as the source branch.
destinationReference (string) --
The branch of the repository where the pull request changes will be merged into. Also known as the destination branch.
destinationCommit (string) --
The full commit ID that is the tip of the destination branch. This is the commit where the pull request was or will be merged.
sourceCommit (string) --
The full commit ID of the tip of the source branch used to create the pull request. If the pull request branch is updated by a push while the pull request is open, the commit ID will change to reflect the new tip of the branch.
mergeMetadata (dict) --
Returns metadata about the state of the merge, including whether the merge has been made.
isMerged (boolean) --
A Boolean value indicating whether the merge has been made.
mergedBy (string) --
The Amazon Resource Name (ARN) of the user who merged the branches.
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 will return information about the initial request that used that token.
Replaces the title of a pull request.
See also: AWS API Documentation
Request Syntax
client.update_pull_request_title( pullRequestId='string', title='string' )
string
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests.
string
[REQUIRED]
The updated title of the pull request. This will replace the existing title.
dict
Response Syntax
{ 'pullRequest': { 'pullRequestId': 'string', 'title': 'string', 'description': 'string', 'lastActivityDate': datetime(2015, 1, 1), 'creationDate': datetime(2015, 1, 1), 'pullRequestStatus': 'OPEN'|'CLOSED', 'authorArn': 'string', 'pullRequestTargets': [ { 'repositoryName': 'string', 'sourceReference': 'string', 'destinationReference': 'string', 'destinationCommit': 'string', 'sourceCommit': 'string', 'mergeMetadata': { 'isMerged': True|False, 'mergedBy': 'string' } }, ], 'clientRequestToken': 'string' } }
Response Structure
(dict) --
pullRequest (dict) --
Information about the updated pull request.
pullRequestId (string) --
The system-generated ID of the pull request.
title (string) --
The user-defined title of the pull request. This title is displayed in the list of pull requests to other users of the repository.
description (string) --
The user-defined description of the pull request. This description can be used to clarify what should be reviewed and other details of the request.
lastActivityDate (datetime) --
The day and time of the last user or system activity on the pull request, in timestamp format.
creationDate (datetime) --
The date and time the pull request was originally created, in timestamp format.
pullRequestStatus (string) --
The status of the pull request. Pull request status can only change from OPEN to CLOSED.
authorArn (string) --
The Amazon Resource Name (ARN) of the user who created the pull request.
pullRequestTargets (list) --
The targets of the pull request, including the source branch and destination branch for the pull request.
(dict) --
Returns information about a pull request target.
repositoryName (string) --
The name of the repository that contains the pull request source and destination branches.
sourceReference (string) --
The branch of the repository that contains the changes for the pull request. Also known as the source branch.
destinationReference (string) --
The branch of the repository where the pull request changes will be merged into. Also known as the destination branch.
destinationCommit (string) --
The full commit ID that is the tip of the destination branch. This is the commit where the pull request was or will be merged.
sourceCommit (string) --
The full commit ID of the tip of the source branch used to create the pull request. If the pull request branch is updated by a push while the pull request is open, the commit ID will change to reflect the new tip of the branch.
mergeMetadata (dict) --
Returns metadata about the state of the merge, including whether the merge has been made.
isMerged (boolean) --
A Boolean value indicating whether the merge has been made.
mergedBy (string) --
The Amazon Resource Name (ARN) of the user who merged the branches.
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 will return information about the initial request that used that token.
Replaces the contents of the description of a pull request.
See also: AWS API Documentation
Request Syntax
client.update_pull_request_description( pullRequestId='string', description='string' )
string
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests.
string
[REQUIRED]
The updated content of the description for the pull request. This content will replace the existing description.
dict
Response Syntax
{ 'pullRequest': { 'pullRequestId': 'string', 'title': 'string', 'description': 'string', 'lastActivityDate': datetime(2015, 1, 1), 'creationDate': datetime(2015, 1, 1), 'pullRequestStatus': 'OPEN'|'CLOSED', 'authorArn': 'string', 'pullRequestTargets': [ { 'repositoryName': 'string', 'sourceReference': 'string', 'destinationReference': 'string', 'destinationCommit': 'string', 'sourceCommit': 'string', 'mergeMetadata': { 'isMerged': True|False, 'mergedBy': 'string' } }, ], 'clientRequestToken': 'string' } }
Response Structure
(dict) --
pullRequest (dict) --
Information about the updated pull request.
pullRequestId (string) --
The system-generated ID of the pull request.
title (string) --
The user-defined title of the pull request. This title is displayed in the list of pull requests to other users of the repository.
description (string) --
The user-defined description of the pull request. This description can be used to clarify what should be reviewed and other details of the request.
lastActivityDate (datetime) --
The day and time of the last user or system activity on the pull request, in timestamp format.
creationDate (datetime) --
The date and time the pull request was originally created, in timestamp format.
pullRequestStatus (string) --
The status of the pull request. Pull request status can only change from OPEN to CLOSED.
authorArn (string) --
The Amazon Resource Name (ARN) of the user who created the pull request.
pullRequestTargets (list) --
The targets of the pull request, including the source branch and destination branch for the pull request.
(dict) --
Returns information about a pull request target.
repositoryName (string) --
The name of the repository that contains the pull request source and destination branches.
sourceReference (string) --
The branch of the repository that contains the changes for the pull request. Also known as the source branch.
destinationReference (string) --
The branch of the repository where the pull request changes will be merged into. Also known as the destination branch.
destinationCommit (string) --
The full commit ID that is the tip of the destination branch. This is the commit where the pull request was or will be merged.
sourceCommit (string) --
The full commit ID of the tip of the source branch used to create the pull request. If the pull request branch is updated by a push while the pull request is open, the commit ID will change to reflect the new tip of the branch.
mergeMetadata (dict) --
Returns metadata about the state of the merge, including whether the merge has been made.
isMerged (boolean) --
A Boolean value indicating whether the merge has been made.
mergedBy (string) --
The Amazon Resource Name (ARN) of the user who merged the branches.
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 will return information about the initial request that used that token.
Posts a comment on the comparison between two commits.
See also: AWS API Documentation
Request Syntax
client.post_comment_for_compared_commit( repositoryName='string', beforeCommitId='string', afterCommitId='string', location={ 'filePath': 'string', 'filePosition': 123, 'relativeFileVersion': 'BEFORE'|'AFTER' }, content='string', clientRequestToken='string' )
string
[REQUIRED]
The name of the repository where you want to post a comment on the comparison between commits.
string
To establish the directionality of the comparison, the full commit ID of the 'before' commit.
string
[REQUIRED]
To establish the directionality of the comparison, the full commit ID of the 'after' commit.
dict
The location of the comparison where you want to comment.
filePath (string) --
The name of the file being compared, including its extension and subdirectory, if any.
filePosition (integer) --
The position of a change within 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.
string
[REQUIRED]
The content of the comment you want to make.
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 will return information about the initial request that used that token.
This field is autopopulated if not provided.
dict
Response Syntax
{ 'repositoryName': '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' } }
Response Structure
(dict) --
repositoryName (string) --
The name of the repository where you posted a comment on the comparison between commits.
beforeCommitId (string) --
In the directionality you established, the full commit ID of the 'before' commit.
afterCommitId (string) --
In the directionality you established, the full commit ID of the 'after' commit.
beforeBlobId (string) --
In the directionality you established, the blob ID of the 'before' blob.
afterBlobId (string) --
In the directionality you established, the blob ID of the 'after' blob.
location (dict) --
The location of the comment in the comparison between the two commits.
filePath (string) --
The name of the file being compared, including its extension and subdirectory, if any.
filePosition (integer) --
The position of a change within 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 will return information about the initial request that used that token.
Deletes the content of a comment made on a change, file, or commit in a repository.
See also: AWS API Documentation
Request Syntax
client.delete_comment_content( commentId='string' )
string
[REQUIRED]
The unique, system-generated ID of the comment. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest.
dict
Response Syntax
{ 'comment': { 'commentId': 'string', 'content': 'string', 'inReplyTo': 'string', 'creationDate': datetime(2015, 1, 1), 'lastModifiedDate': datetime(2015, 1, 1), 'authorArn': 'string', 'deleted': True|False, 'clientRequestToken': 'string' } }
Response Structure
(dict) --
comment (dict) --
Information about the comment you just deleted.
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 will return information about the initial request that used that token.
Returns information about merge conflicts between the before and after commit IDs for a pull request in a repository.
See also: AWS API Documentation
Request Syntax
client.get_merge_conflicts( repositoryName='string', destinationCommitSpecifier='string', sourceCommitSpecifier='string', mergeOption='FAST_FORWARD_MERGE' )
string
[REQUIRED]
The name of the repository where the pull request was created.
string
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit. For example, a branch name or a full commit ID.
string
[REQUIRED]
The branch, tag, HEAD, or other fully qualified reference used to identify a commit. For example, a branch name or a full commit ID.
string
[REQUIRED]
The merge option or strategy you want to use to merge the code. The only valid value is FAST_FORWARD_MERGE.
dict
Response Syntax
{ 'mergeable': True|False, 'destinationCommitId': 'string', 'sourceCommitId': 'string' }
Response Structure
(dict) --
mergeable (boolean) --
A Boolean value that indicates whether the code is mergable by the specified merge option.
destinationCommitId (string) --
The commit ID of the destination commit specifier that was used in the merge evaluation.
sourceCommitId (string) --
The commit ID of the source commit specifier that was used in the merge evaluation.
Returns comments made on a pull request.
See also: AWS API Documentation
Request Syntax
client.get_comments_for_pull_request( pullRequestId='string', repositoryName='string', beforeCommitId='string', afterCommitId='string', nextToken='string', maxResults=123 )
string
[REQUIRED]
The system-generated ID of the pull request. To get this ID, use ListPullRequests.
string
The name of the repository that contains the pull request.
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.
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.
string
An enumeration token that when provided in a request, returns the next batch of the results.
integer
A 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.
dict
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' }, ] }, ], '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 will be superceded by the after commit in the source branch when and if you merge the source branch into the destination branch.
afterCommitId (string) --
he 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 within 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 will return information about the initial request that used that token.
nextToken (string) --
An enumeration token that can be used in a request to return the next batch of the results.