AWS CodeCommit

2019/06/10 - AWS CodeCommit - 10 new8 updated api methods

Changes  Update codecommit client to latest version

MergePullRequestBySquash (new) Link ¶

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 squash merge strategy.

See also: AWS API Documentation

Request Syntax

client.merge_pull_request_by_squash(
    pullRequestId='string',
    repositoryName='string',
    sourceCommitId='string',
    conflictDetailLevel='FILE_LEVEL'|'LINE_LEVEL',
    conflictResolutionStrategy='NONE'|'ACCEPT_SOURCE'|'ACCEPT_DESTINATION'|'AUTOMERGE',
    commitMessage='string',
    authorName='string',
    email='string',
    keepEmptyFolders=True|False,
    conflictResolution={
        'replaceContents': [
            {
                'filePath': 'string',
                'replacementType': 'KEEP_BASE'|'KEEP_SOURCE'|'KEEP_DESTINATION'|'USE_NEW_CONTENT',
                'content': b'bytes',
                'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
            },
        ],
        'deleteFiles': [
            {
                'filePath': 'string'
            },
        ],
        'setFileModes': [
            {
                'filePath': 'string',
                'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
            },
        ]
    }
)
type pullRequestId:

string

param pullRequestId:

[REQUIRED]

The system-generated ID of the pull request. To get this ID, use ListPullRequests.

type repositoryName:

string

param repositoryName:

[REQUIRED]

The name of the repository where the pull request was created.

type sourceCommitId:

string

param sourceCommitId:

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.

type conflictDetailLevel:

string

param conflictDetailLevel:

The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which will return a not mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict will be considered not mergeable if the same file in both branches has differences on the same line.

type conflictResolutionStrategy:

string

param conflictResolutionStrategy:

Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation will be successful.

type commitMessage:

string

param commitMessage:

The commit message to include in the commit information for the merge.

type authorName:

string

param authorName:

The name of the author who created the commit. This information will be used as both the author and committer for the commit.

type email:

string

param email:

The email address of the person merging the branches. This information will be used in the commit information for the merge.

type keepEmptyFolders:

boolean

param keepEmptyFolders:

If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If this is specified as true, a .gitkeep file will be created for empty folders. The default is false.

type conflictResolution:

dict

param conflictResolution:

A list of inputs to use when resolving conflicts during a merge if AUTOMERGE is chosen as the conflict resolution strategy.

  • replaceContents (list) --

    Information about how a conflict in a merge will be resolved.

    • (dict) --

      Information about a replacement content entry in the conflict of a merge or pull request operation.

      • filePath (string) -- [REQUIRED]

        The path of the conflicting file.

      • replacementType (string) -- [REQUIRED]

        The replacement type to use when determining how to resolve the conflict.

      • content (bytes) --

        The base-64 encoded content to use when the replacement type is USE_NEW_CONTENT.

      • fileMode (string) --

        The file mode to apply during conflict resoltion.

  • deleteFiles (list) --

    Files that will be deleted as part of the merge conflict resolution.

    • (dict) --

      A file that will be deleted as part of a commit.

      • filePath (string) -- [REQUIRED]

        The full path of the file that will be deleted, including the name of the file.

  • setFileModes (list) --

    File modes that will be set as part of the merge conflict resolution.

    • (dict) --

      Information about the file mode changes.

      • filePath (string) -- [REQUIRED]

        The full path to the file, including the name of the file.

      • fileMode (string) -- [REQUIRED]

        The file mode for the file.

rtype:

dict

returns:

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',
                'mergeBase': 'string',
                'mergeMetadata': {
                    'isMerged': True|False,
                    'mergedBy': 'string',
                    'mergeCommitId': 'string',
                    'mergeOption': 'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE'
                }
            },
        ],
        'clientRequestToken': 'string'
    }
}

Response Structure

  • (dict) --

    • pullRequest (dict) --

      Returns information about a 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.

          • mergeBase (string) --

            The commit ID of the most recent commit that the source branch and the destination branch have in common.

          • 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.

            • mergeCommitId (string) --

              The commit ID for the merge commit, if any.

            • mergeOption (string) --

              The merge strategy used in the merge.

      • 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.

BatchDescribeMergeConflicts (new) Link ¶

Returns information about one or more merge conflicts in the attempted merge of two commit specifiers using the squash or three-way merge strategy.

See also: AWS API Documentation

Request Syntax

client.batch_describe_merge_conflicts(
    repositoryName='string',
    destinationCommitSpecifier='string',
    sourceCommitSpecifier='string',
    mergeOption='FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE',
    maxMergeHunks=123,
    maxConflictFiles=123,
    filePaths=[
        'string',
    ],
    conflictDetailLevel='FILE_LEVEL'|'LINE_LEVEL',
    conflictResolutionStrategy='NONE'|'ACCEPT_SOURCE'|'ACCEPT_DESTINATION'|'AUTOMERGE',
    nextToken='string'
)
type repositoryName:

string

param repositoryName:

[REQUIRED]

The name of the repository that contains the merge conflicts you want to review.

type destinationCommitSpecifier:

string

param destinationCommitSpecifier:

[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.

type sourceCommitSpecifier:

string

param sourceCommitSpecifier:

[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.

type mergeOption:

string

param mergeOption:

[REQUIRED]

The merge option or strategy you want to use to merge the code.

type maxMergeHunks:

integer

param maxMergeHunks:

The maximum number of merge hunks to include in the output.

type maxConflictFiles:

integer

param maxConflictFiles:

The maximum number of files to include in the output.

type filePaths:

list

param filePaths:

The path of the target files used to describe the conflicts. If not specified, the default is all conflict files.

  • (string) --

type conflictDetailLevel:

string

param conflictDetailLevel:

The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which will return a not mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict will be considered not mergeable if the same file in both branches has differences on the same line.

type conflictResolutionStrategy:

string

param conflictResolutionStrategy:

Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation will be successful.

type nextToken:

string

param nextToken:

An enumeration token that when provided in a request, returns the next batch of the results.

rtype:

dict

returns:

Response Syntax

{
    'conflicts': [
        {
            'conflictMetadata': {
                'filePath': 'string',
                'fileSizes': {
                    'source': 123,
                    'destination': 123,
                    'base': 123
                },
                'fileModes': {
                    'source': 'EXECUTABLE'|'NORMAL'|'SYMLINK',
                    'destination': 'EXECUTABLE'|'NORMAL'|'SYMLINK',
                    'base': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
                },
                'objectTypes': {
                    'source': 'FILE'|'DIRECTORY'|'GIT_LINK'|'SYMBOLIC_LINK',
                    'destination': 'FILE'|'DIRECTORY'|'GIT_LINK'|'SYMBOLIC_LINK',
                    'base': 'FILE'|'DIRECTORY'|'GIT_LINK'|'SYMBOLIC_LINK'
                },
                'numberOfConflicts': 123,
                'isBinaryFile': {
                    'source': True|False,
                    'destination': True|False,
                    'base': True|False
                },
                'contentConflict': True|False,
                'fileModeConflict': True|False,
                'objectTypeConflict': True|False,
                'mergeOperations': {
                    'source': 'A'|'M'|'D',
                    'destination': 'A'|'M'|'D'
                }
            },
            'mergeHunks': [
                {
                    'isConflict': True|False,
                    'source': {
                        'startLine': 123,
                        'endLine': 123,
                        'hunkContent': 'string'
                    },
                    'destination': {
                        'startLine': 123,
                        'endLine': 123,
                        'hunkContent': 'string'
                    },
                    'base': {
                        'startLine': 123,
                        'endLine': 123,
                        'hunkContent': 'string'
                    }
                },
            ]
        },
    ],
    'nextToken': 'string',
    'errors': [
        {
            'filePath': 'string',
            'exceptionName': 'string',
            'message': 'string'
        },
    ],
    'destinationCommitId': 'string',
    'sourceCommitId': 'string',
    'baseCommitId': 'string'
}

Response Structure

  • (dict) --

    • conflicts (list) --

      A list of conflicts for each file, including the conflict metadata and the hunks of the differences between the files.

      • (dict) --

        Information about conflicts in a merge operation.

        • conflictMetadata (dict) --

          Metadata about a conflict in a merge operation.

          • filePath (string) --

            The path of the file that contains conflicts.

          • fileSizes (dict) --

            The file sizes of the file in the source, destination, and base of the merge.

            • source (integer) --

              The size of a file in the source of a merge or pull request.

            • destination (integer) --

              The size of a file in the destination of a merge or pull request.

            • base (integer) --

              The size of a file in the base of a merge or pull request.

          • fileModes (dict) --

            The file modes of the file in the source, destination, and base of the merge.

            • source (string) --

              The file mode of a file in the source of a merge or pull request.

            • destination (string) --

              The file mode of a file in the destination of a merge or pull request.

            • base (string) --

              The file mode of a file in the base of a merge or pull request.

          • objectTypes (dict) --

            Information about any object type conflicts in a merge operation.

            • source (string) --

              The type of the object in the source branch.

            • destination (string) --

              The type of the object in the destination branch.

            • base (string) --

              The type of the object in the base commit of the merge.

          • numberOfConflicts (integer) --

            The number of conflicts, including both hunk conflicts and metadata conflicts.

          • isBinaryFile (dict) --

            A boolean value (true or false) indicating whether the file is binary or textual in the source, destination, and base of the merge.

            • source (boolean) --

              The binary or non-binary status of file in the source of a merge or pull request.

            • destination (boolean) --

              The binary or non-binary status of a file in the destination of a merge or pull request.

            • base (boolean) --

              The binary or non-binary status of a file in the base of a merge or pull request.

          • contentConflict (boolean) --

            A boolean value indicating whether there are conflicts in the content of a file.

          • fileModeConflict (boolean) --

            A boolean value indicating whether there are conflicts in the file mode of a file.

          • objectTypeConflict (boolean) --

            A boolean value (true or false) indicating whether there are conflicts in the object type of a file.

          • mergeOperations (dict) --

            Whether an add, modify, or delete operation caused the conflict between the source and destination of the merge.

            • source (string) --

              The operation on a file (add, modify, or delete) of a file in the source of a merge or pull request.

            • destination (string) --

              The operation on a file in the destination of a merge or pull request.

        • mergeHunks (list) --

          A list of hunks that contain the differences between files or lines causing the conflict.

          • (dict) --

            Information about merge hunks in a merge or pull request operation.

            • isConflict (boolean) --

              A Boolean value indicating whether a combination of hunks contains a conflict. Conflicts occur when the same file or the same lines in a file were modified in both the source and destination of a merge or pull request. Valid values include true, false, and null.

            • source (dict) --

              Information about the merge hunk in the source of a merge or pull request.

              • startLine (integer) --

                The line number where a merge conflict begins.

              • endLine (integer) --

                The line number where a merge conflict ends.

              • hunkContent (string) --

                The base-64 encoded content of the hunk that contains the conflict.

            • destination (dict) --

              Information about the merge hunk in the destination of a merge or pull request.

              • startLine (integer) --

                The line number where a merge conflict begins.

              • endLine (integer) --

                The line number where a merge conflict ends.

              • hunkContent (string) --

                The base-64 encoded content of the hunk that contains the conflict.

            • base (dict) --

              Information about the merge hunk in the base of a merge or pull request.

              • startLine (integer) --

                The line number where a merge conflict begins.

              • endLine (integer) --

                The line number where a merge conflict ends.

              • hunkContent (string) --

                The base-64 encoded content of the hunk that contains the conflict.

    • nextToken (string) --

      An enumeration token that can be used in a request to return the next batch of the results.

    • errors (list) --

      A list of any errors returned while describing the merge conflicts for each file.

      • (dict) --

        Information about errors in a BatchDescribeMergeConflicts operation.

        • filePath (string) --

          The path to the file.

        • exceptionName (string) --

          The name of the exception.

        • message (string) --

          The message provided by the exception.

    • 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.

    • baseCommitId (string) --

      The commit ID of the merge base.

MergePullRequestByThreeWay (new) Link ¶

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 three-way merge strategy.

See also: AWS API Documentation

Request Syntax

client.merge_pull_request_by_three_way(
    pullRequestId='string',
    repositoryName='string',
    sourceCommitId='string',
    conflictDetailLevel='FILE_LEVEL'|'LINE_LEVEL',
    conflictResolutionStrategy='NONE'|'ACCEPT_SOURCE'|'ACCEPT_DESTINATION'|'AUTOMERGE',
    commitMessage='string',
    authorName='string',
    email='string',
    keepEmptyFolders=True|False,
    conflictResolution={
        'replaceContents': [
            {
                'filePath': 'string',
                'replacementType': 'KEEP_BASE'|'KEEP_SOURCE'|'KEEP_DESTINATION'|'USE_NEW_CONTENT',
                'content': b'bytes',
                'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
            },
        ],
        'deleteFiles': [
            {
                'filePath': 'string'
            },
        ],
        'setFileModes': [
            {
                'filePath': 'string',
                'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
            },
        ]
    }
)
type pullRequestId:

string

param pullRequestId:

[REQUIRED]

The system-generated ID of the pull request. To get this ID, use ListPullRequests.

type repositoryName:

string

param repositoryName:

[REQUIRED]

The name of the repository where the pull request was created.

type sourceCommitId:

string

param sourceCommitId:

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.

type conflictDetailLevel:

string

param conflictDetailLevel:

The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which will return a not mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict will be considered not mergeable if the same file in both branches has differences on the same line.

type conflictResolutionStrategy:

string

param conflictResolutionStrategy:

Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation will be successful.

type commitMessage:

string

param commitMessage:

The commit message to include in the commit information for the merge.

type authorName:

string

param authorName:

The name of the author who created the commit. This information will be used as both the author and committer for the commit.

type email:

string

param email:

The email address of the person merging the branches. This information will be used in the commit information for the merge.

type keepEmptyFolders:

boolean

param keepEmptyFolders:

If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If this is specified as true, a .gitkeep file will be created for empty folders. The default is false.

type conflictResolution:

dict

param conflictResolution:

A list of inputs to use when resolving conflicts during a merge if AUTOMERGE is chosen as the conflict resolution strategy.

  • replaceContents (list) --

    Information about how a conflict in a merge will be resolved.

    • (dict) --

      Information about a replacement content entry in the conflict of a merge or pull request operation.

      • filePath (string) -- [REQUIRED]

        The path of the conflicting file.

      • replacementType (string) -- [REQUIRED]

        The replacement type to use when determining how to resolve the conflict.

      • content (bytes) --

        The base-64 encoded content to use when the replacement type is USE_NEW_CONTENT.

      • fileMode (string) --

        The file mode to apply during conflict resoltion.

  • deleteFiles (list) --

    Files that will be deleted as part of the merge conflict resolution.

    • (dict) --

      A file that will be deleted as part of a commit.

      • filePath (string) -- [REQUIRED]

        The full path of the file that will be deleted, including the name of the file.

  • setFileModes (list) --

    File modes that will be set as part of the merge conflict resolution.

    • (dict) --

      Information about the file mode changes.

      • filePath (string) -- [REQUIRED]

        The full path to the file, including the name of the file.

      • fileMode (string) -- [REQUIRED]

        The file mode for the file.

rtype:

dict

returns:

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',
                'mergeBase': 'string',
                'mergeMetadata': {
                    'isMerged': True|False,
                    'mergedBy': 'string',
                    'mergeCommitId': 'string',
                    'mergeOption': 'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE'
                }
            },
        ],
        'clientRequestToken': 'string'
    }
}

Response Structure

  • (dict) --

    • pullRequest (dict) --

      Returns information about a 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.

          • mergeBase (string) --

            The commit ID of the most recent commit that the source branch and the destination branch have in common.

          • 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.

            • mergeCommitId (string) --

              The commit ID for the merge commit, if any.

            • mergeOption (string) --

              The merge strategy used in the merge.

      • 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.

CreateUnreferencedMergeCommit (new) Link ¶

Creates an unerferenced commit that represents the result of merging two branches using a specified merge strategy. This can help you determine the outcome of a potential merge.

See also: AWS API Documentation

Request Syntax

client.create_unreferenced_merge_commit(
    repositoryName='string',
    sourceCommitSpecifier='string',
    destinationCommitSpecifier='string',
    mergeOption='FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE',
    conflictDetailLevel='FILE_LEVEL'|'LINE_LEVEL',
    conflictResolutionStrategy='NONE'|'ACCEPT_SOURCE'|'ACCEPT_DESTINATION'|'AUTOMERGE',
    authorName='string',
    email='string',
    commitMessage='string',
    keepEmptyFolders=True|False,
    conflictResolution={
        'replaceContents': [
            {
                'filePath': 'string',
                'replacementType': 'KEEP_BASE'|'KEEP_SOURCE'|'KEEP_DESTINATION'|'USE_NEW_CONTENT',
                'content': b'bytes',
                'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
            },
        ],
        'deleteFiles': [
            {
                'filePath': 'string'
            },
        ],
        'setFileModes': [
            {
                'filePath': 'string',
                'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
            },
        ]
    }
)
type repositoryName:

string

param repositoryName:

[REQUIRED]

The name of the repository where you want to create the unreferenced merge commit.

type sourceCommitSpecifier:

string

param sourceCommitSpecifier:

[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.

type destinationCommitSpecifier:

string

param destinationCommitSpecifier:

[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.

type mergeOption:

string

param mergeOption:

[REQUIRED]

The merge option or strategy you want to use to merge the code.

type conflictDetailLevel:

string

param conflictDetailLevel:

The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which will return a not mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict will be considered not mergeable if the same file in both branches has differences on the same line.

type conflictResolutionStrategy:

string

param conflictResolutionStrategy:

Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation will be successful.

type authorName:

string

param authorName:

The name of the author who created the unreferenced commit. This information will be used as both the author and committer for the commit.

type email:

string

param email:

The email address for the person who created the unreferenced commit.

type commitMessage:

string

param commitMessage:

The commit message for the unreferenced commit.

type keepEmptyFolders:

boolean

param keepEmptyFolders:

If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If this is specified as true, a .gitkeep file will be created for empty folders. The default is false.

type conflictResolution:

dict

param conflictResolution:

A list of inputs to use when resolving conflicts during a merge if AUTOMERGE is chosen as the conflict resolution strategy.

  • replaceContents (list) --

    Information about how a conflict in a merge will be resolved.

    • (dict) --

      Information about a replacement content entry in the conflict of a merge or pull request operation.

      • filePath (string) -- [REQUIRED]

        The path of the conflicting file.

      • replacementType (string) -- [REQUIRED]

        The replacement type to use when determining how to resolve the conflict.

      • content (bytes) --

        The base-64 encoded content to use when the replacement type is USE_NEW_CONTENT.

      • fileMode (string) --

        The file mode to apply during conflict resoltion.

  • deleteFiles (list) --

    Files that will be deleted as part of the merge conflict resolution.

    • (dict) --

      A file that will be deleted as part of a commit.

      • filePath (string) -- [REQUIRED]

        The full path of the file that will be deleted, including the name of the file.

  • setFileModes (list) --

    File modes that will be set as part of the merge conflict resolution.

    • (dict) --

      Information about the file mode changes.

      • filePath (string) -- [REQUIRED]

        The full path to the file, including the name of the file.

      • fileMode (string) -- [REQUIRED]

        The file mode for the file.

rtype:

dict

returns:

Response Syntax

{
    'commitId': 'string',
    'treeId': 'string'
}

Response Structure

  • (dict) --

    • commitId (string) --

      The full commit ID of the commit that contains your merge results.

    • treeId (string) --

      The full SHA-1 pointer of the tree information for the commit that contains the merge results.

DescribeMergeConflicts (new) Link ¶

Returns information about one or more merge conflicts in the attempted merge of two commit specifiers using the squash or three-way merge strategy. If the merge option for the attempted merge is specified as FAST_FORWARD_MERGE, an exception will be thrown.

See also: AWS API Documentation

Request Syntax

client.describe_merge_conflicts(
    repositoryName='string',
    destinationCommitSpecifier='string',
    sourceCommitSpecifier='string',
    mergeOption='FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE',
    maxMergeHunks=123,
    filePath='string',
    conflictDetailLevel='FILE_LEVEL'|'LINE_LEVEL',
    conflictResolutionStrategy='NONE'|'ACCEPT_SOURCE'|'ACCEPT_DESTINATION'|'AUTOMERGE',
    nextToken='string'
)
type repositoryName:

string

param repositoryName:

[REQUIRED]

The name of the repository where you want to get information about a merge conflict.

type destinationCommitSpecifier:

string

param destinationCommitSpecifier:

[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.

type sourceCommitSpecifier:

string

param sourceCommitSpecifier:

[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.

type mergeOption:

string

param mergeOption:

[REQUIRED]

The merge option or strategy you want to use to merge the code.

type maxMergeHunks:

integer

param maxMergeHunks:

The maximum number of merge hunks to include in the output.

type filePath:

string

param filePath:

[REQUIRED]

The path of the target files used to describe the conflicts.

type conflictDetailLevel:

string

param conflictDetailLevel:

The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which will return a not mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict will be considered not mergeable if the same file in both branches has differences on the same line.

type conflictResolutionStrategy:

string

param conflictResolutionStrategy:

Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation will be successful.

type nextToken:

string

param nextToken:

An enumeration token that when provided in a request, returns the next batch of the results.

rtype:

dict

returns:

Response Syntax

{
    'conflictMetadata': {
        'filePath': 'string',
        'fileSizes': {
            'source': 123,
            'destination': 123,
            'base': 123
        },
        'fileModes': {
            'source': 'EXECUTABLE'|'NORMAL'|'SYMLINK',
            'destination': 'EXECUTABLE'|'NORMAL'|'SYMLINK',
            'base': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
        },
        'objectTypes': {
            'source': 'FILE'|'DIRECTORY'|'GIT_LINK'|'SYMBOLIC_LINK',
            'destination': 'FILE'|'DIRECTORY'|'GIT_LINK'|'SYMBOLIC_LINK',
            'base': 'FILE'|'DIRECTORY'|'GIT_LINK'|'SYMBOLIC_LINK'
        },
        'numberOfConflicts': 123,
        'isBinaryFile': {
            'source': True|False,
            'destination': True|False,
            'base': True|False
        },
        'contentConflict': True|False,
        'fileModeConflict': True|False,
        'objectTypeConflict': True|False,
        'mergeOperations': {
            'source': 'A'|'M'|'D',
            'destination': 'A'|'M'|'D'
        }
    },
    'mergeHunks': [
        {
            'isConflict': True|False,
            'source': {
                'startLine': 123,
                'endLine': 123,
                'hunkContent': 'string'
            },
            'destination': {
                'startLine': 123,
                'endLine': 123,
                'hunkContent': 'string'
            },
            'base': {
                'startLine': 123,
                'endLine': 123,
                'hunkContent': 'string'
            }
        },
    ],
    'nextToken': 'string',
    'destinationCommitId': 'string',
    'sourceCommitId': 'string',
    'baseCommitId': 'string'
}

Response Structure

  • (dict) --

    • conflictMetadata (dict) --

      Contains metadata about the conflicts found in the merge.

      • filePath (string) --

        The path of the file that contains conflicts.

      • fileSizes (dict) --

        The file sizes of the file in the source, destination, and base of the merge.

        • source (integer) --

          The size of a file in the source of a merge or pull request.

        • destination (integer) --

          The size of a file in the destination of a merge or pull request.

        • base (integer) --

          The size of a file in the base of a merge or pull request.

      • fileModes (dict) --

        The file modes of the file in the source, destination, and base of the merge.

        • source (string) --

          The file mode of a file in the source of a merge or pull request.

        • destination (string) --

          The file mode of a file in the destination of a merge or pull request.

        • base (string) --

          The file mode of a file in the base of a merge or pull request.

      • objectTypes (dict) --

        Information about any object type conflicts in a merge operation.

        • source (string) --

          The type of the object in the source branch.

        • destination (string) --

          The type of the object in the destination branch.

        • base (string) --

          The type of the object in the base commit of the merge.

      • numberOfConflicts (integer) --

        The number of conflicts, including both hunk conflicts and metadata conflicts.

      • isBinaryFile (dict) --

        A boolean value (true or false) indicating whether the file is binary or textual in the source, destination, and base of the merge.

        • source (boolean) --

          The binary or non-binary status of file in the source of a merge or pull request.

        • destination (boolean) --

          The binary or non-binary status of a file in the destination of a merge or pull request.

        • base (boolean) --

          The binary or non-binary status of a file in the base of a merge or pull request.

      • contentConflict (boolean) --

        A boolean value indicating whether there are conflicts in the content of a file.

      • fileModeConflict (boolean) --

        A boolean value indicating whether there are conflicts in the file mode of a file.

      • objectTypeConflict (boolean) --

        A boolean value (true or false) indicating whether there are conflicts in the object type of a file.

      • mergeOperations (dict) --

        Whether an add, modify, or delete operation caused the conflict between the source and destination of the merge.

        • source (string) --

          The operation on a file (add, modify, or delete) of a file in the source of a merge or pull request.

        • destination (string) --

          The operation on a file in the destination of a merge or pull request.

    • mergeHunks (list) --

      A list of merge hunks of the differences between the files or lines.

      • (dict) --

        Information about merge hunks in a merge or pull request operation.

        • isConflict (boolean) --

          A Boolean value indicating whether a combination of hunks contains a conflict. Conflicts occur when the same file or the same lines in a file were modified in both the source and destination of a merge or pull request. Valid values include true, false, and null.

        • source (dict) --

          Information about the merge hunk in the source of a merge or pull request.

          • startLine (integer) --

            The line number where a merge conflict begins.

          • endLine (integer) --

            The line number where a merge conflict ends.

          • hunkContent (string) --

            The base-64 encoded content of the hunk that contains the conflict.

        • destination (dict) --

          Information about the merge hunk in the destination of a merge or pull request.

          • startLine (integer) --

            The line number where a merge conflict begins.

          • endLine (integer) --

            The line number where a merge conflict ends.

          • hunkContent (string) --

            The base-64 encoded content of the hunk that contains the conflict.

        • base (dict) --

          Information about the merge hunk in the base of a merge or pull request.

          • startLine (integer) --

            The line number where a merge conflict begins.

          • endLine (integer) --

            The line number where a merge conflict ends.

          • hunkContent (string) --

            The base-64 encoded content of the hunk that contains the conflict.

    • nextToken (string) --

      An enumeration token that can be used in a request to return the next batch of the results.

    • 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.

    • baseCommitId (string) --

      The commit ID of the merge base.

GetMergeOptions (new) Link ¶

Returns information about the merge options available for merging two specified branches. For details about why a particular merge option is not available, use GetMergeConflicts or DescribeMergeConflicts.

See also: AWS API Documentation

Request Syntax

client.get_merge_options(
    repositoryName='string',
    sourceCommitSpecifier='string',
    destinationCommitSpecifier='string',
    conflictDetailLevel='FILE_LEVEL'|'LINE_LEVEL',
    conflictResolutionStrategy='NONE'|'ACCEPT_SOURCE'|'ACCEPT_DESTINATION'|'AUTOMERGE'
)
type repositoryName:

string

param repositoryName:

[REQUIRED]

The name of the repository that contains the commits about which you want to get merge options.

type sourceCommitSpecifier:

string

param sourceCommitSpecifier:

[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.

type destinationCommitSpecifier:

string

param destinationCommitSpecifier:

[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.

type conflictDetailLevel:

string

param conflictDetailLevel:

The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which will return a not mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict will be considered not mergeable if the same file in both branches has differences on the same line.

type conflictResolutionStrategy:

string

param conflictResolutionStrategy:

Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation will be successful.

rtype:

dict

returns:

Response Syntax

{
    'mergeOptions': [
        'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE',
    ],
    'sourceCommitId': 'string',
    'destinationCommitId': 'string',
    'baseCommitId': 'string'
}

Response Structure

  • (dict) --

    • mergeOptions (list) --

      The merge option or strategy used to merge the code.

      • (string) --

    • sourceCommitId (string) --

      The commit ID of the source commit specifier that was used in the merge evaluation.

    • destinationCommitId (string) --

      The commit ID of the destination commit specifier that was used in the merge evaluation.

    • baseCommitId (string) --

      The commit ID of the merge base.

MergeBranchesByThreeWay (new) Link ¶

Merges two specified branches using the three-way merge strategy.

See also: AWS API Documentation

Request Syntax

client.merge_branches_by_three_way(
    repositoryName='string',
    sourceCommitSpecifier='string',
    destinationCommitSpecifier='string',
    targetBranch='string',
    conflictDetailLevel='FILE_LEVEL'|'LINE_LEVEL',
    conflictResolutionStrategy='NONE'|'ACCEPT_SOURCE'|'ACCEPT_DESTINATION'|'AUTOMERGE',
    authorName='string',
    email='string',
    commitMessage='string',
    keepEmptyFolders=True|False,
    conflictResolution={
        'replaceContents': [
            {
                'filePath': 'string',
                'replacementType': 'KEEP_BASE'|'KEEP_SOURCE'|'KEEP_DESTINATION'|'USE_NEW_CONTENT',
                'content': b'bytes',
                'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
            },
        ],
        'deleteFiles': [
            {
                'filePath': 'string'
            },
        ],
        'setFileModes': [
            {
                'filePath': 'string',
                'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
            },
        ]
    }
)
type repositoryName:

string

param repositoryName:

[REQUIRED]

The name of the repository where you want to merge two branches.

type sourceCommitSpecifier:

string

param sourceCommitSpecifier:

[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.

type destinationCommitSpecifier:

string

param destinationCommitSpecifier:

[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.

type targetBranch:

string

param targetBranch:

The branch where the merge will be applied.

type conflictDetailLevel:

string

param conflictDetailLevel:

The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which will return a not mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict will be considered not mergeable if the same file in both branches has differences on the same line.

type conflictResolutionStrategy:

string

param conflictResolutionStrategy:

Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation will be successful.

type authorName:

string

param authorName:

The name of the author who created the commit. This information will be used as both the author and committer for the commit.

type email:

string

param email:

The email address of the person merging the branches. This information will be used in the commit information for the merge.

type commitMessage:

string

param commitMessage:

The commit message to include in the commit information for the merge.

type keepEmptyFolders:

boolean

param keepEmptyFolders:

If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If this is specified as true, a .gitkeep file will be created for empty folders. The default is false.

type conflictResolution:

dict

param conflictResolution:

A list of inputs to use when resolving conflicts during a merge if AUTOMERGE is chosen as the conflict resolution strategy.

  • replaceContents (list) --

    Information about how a conflict in a merge will be resolved.

    • (dict) --

      Information about a replacement content entry in the conflict of a merge or pull request operation.

      • filePath (string) -- [REQUIRED]

        The path of the conflicting file.

      • replacementType (string) -- [REQUIRED]

        The replacement type to use when determining how to resolve the conflict.

      • content (bytes) --

        The base-64 encoded content to use when the replacement type is USE_NEW_CONTENT.

      • fileMode (string) --

        The file mode to apply during conflict resoltion.

  • deleteFiles (list) --

    Files that will be deleted as part of the merge conflict resolution.

    • (dict) --

      A file that will be deleted as part of a commit.

      • filePath (string) -- [REQUIRED]

        The full path of the file that will be deleted, including the name of the file.

  • setFileModes (list) --

    File modes that will be set as part of the merge conflict resolution.

    • (dict) --

      Information about the file mode changes.

      • filePath (string) -- [REQUIRED]

        The full path to the file, including the name of the file.

      • fileMode (string) -- [REQUIRED]

        The file mode for the file.

rtype:

dict

returns:

Response Syntax

{
    'commitId': 'string',
    'treeId': 'string'
}

Response Structure

  • (dict) --

    • commitId (string) --

      The commit ID of the merge in the destination or target branch.

    • treeId (string) --

      The tree ID of the merge in the destination or target branch.

GetMergeCommit (new) Link ¶

Returns information about a specified merge commit.

See also: AWS API Documentation

Request Syntax

client.get_merge_commit(
    repositoryName='string',
    sourceCommitSpecifier='string',
    destinationCommitSpecifier='string',
    conflictDetailLevel='FILE_LEVEL'|'LINE_LEVEL',
    conflictResolutionStrategy='NONE'|'ACCEPT_SOURCE'|'ACCEPT_DESTINATION'|'AUTOMERGE'
)
type repositoryName:

string

param repositoryName:

[REQUIRED]

The name of the repository that contains the merge commit about which you want to get information.

type sourceCommitSpecifier:

string

param sourceCommitSpecifier:

[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.

type destinationCommitSpecifier:

string

param destinationCommitSpecifier:

[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.

type conflictDetailLevel:

string

param conflictDetailLevel:

The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which will return a not mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict will be considered not mergeable if the same file in both branches has differences on the same line.

type conflictResolutionStrategy:

string

param conflictResolutionStrategy:

Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation will be successful.

rtype:

dict

returns:

Response Syntax

{
    'sourceCommitId': 'string',
    'destinationCommitId': 'string',
    'baseCommitId': 'string',
    'mergedCommitId': 'string'
}

Response Structure

  • (dict) --

    • sourceCommitId (string) --

      The commit ID of the source commit specifier that was used in the merge evaluation.

    • destinationCommitId (string) --

      The commit ID of the destination commit specifier that was used in the merge evaluation.

    • baseCommitId (string) --

      The commit ID of the merge base.

    • mergedCommitId (string) --

      The commit ID for the merge commit created when the source branch was merged into the destination branch. If the fast-forward merge strategy was used, no merge commit exists.

MergeBranchesBySquash (new) Link ¶

Merges two branches using the squash merge strategy.

See also: AWS API Documentation

Request Syntax

client.merge_branches_by_squash(
    repositoryName='string',
    sourceCommitSpecifier='string',
    destinationCommitSpecifier='string',
    targetBranch='string',
    conflictDetailLevel='FILE_LEVEL'|'LINE_LEVEL',
    conflictResolutionStrategy='NONE'|'ACCEPT_SOURCE'|'ACCEPT_DESTINATION'|'AUTOMERGE',
    authorName='string',
    email='string',
    commitMessage='string',
    keepEmptyFolders=True|False,
    conflictResolution={
        'replaceContents': [
            {
                'filePath': 'string',
                'replacementType': 'KEEP_BASE'|'KEEP_SOURCE'|'KEEP_DESTINATION'|'USE_NEW_CONTENT',
                'content': b'bytes',
                'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
            },
        ],
        'deleteFiles': [
            {
                'filePath': 'string'
            },
        ],
        'setFileModes': [
            {
                'filePath': 'string',
                'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
            },
        ]
    }
)
type repositoryName:

string

param repositoryName:

[REQUIRED]

The name of the repository where you want to merge two branches.

type sourceCommitSpecifier:

string

param sourceCommitSpecifier:

[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.

type destinationCommitSpecifier:

string

param destinationCommitSpecifier:

[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.

type targetBranch:

string

param targetBranch:

The branch where the merge will be applied.

type conflictDetailLevel:

string

param conflictDetailLevel:

The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which will return a not mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict will be considered not mergeable if the same file in both branches has differences on the same line.

type conflictResolutionStrategy:

string

param conflictResolutionStrategy:

Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation will be successful.

type authorName:

string

param authorName:

The name of the author who created the commit. This information will be used as both the author and committer for the commit.

type email:

string

param email:

The email address of the person merging the branches. This information will be used in the commit information for the merge.

type commitMessage:

string

param commitMessage:

The commit message for the merge.

type keepEmptyFolders:

boolean

param keepEmptyFolders:

If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If this is specified as true, a .gitkeep file will be created for empty folders. The default is false.

type conflictResolution:

dict

param conflictResolution:

A list of inputs to use when resolving conflicts during a merge if AUTOMERGE is chosen as the conflict resolution strategy.

  • replaceContents (list) --

    Information about how a conflict in a merge will be resolved.

    • (dict) --

      Information about a replacement content entry in the conflict of a merge or pull request operation.

      • filePath (string) -- [REQUIRED]

        The path of the conflicting file.

      • replacementType (string) -- [REQUIRED]

        The replacement type to use when determining how to resolve the conflict.

      • content (bytes) --

        The base-64 encoded content to use when the replacement type is USE_NEW_CONTENT.

      • fileMode (string) --

        The file mode to apply during conflict resoltion.

  • deleteFiles (list) --

    Files that will be deleted as part of the merge conflict resolution.

    • (dict) --

      A file that will be deleted as part of a commit.

      • filePath (string) -- [REQUIRED]

        The full path of the file that will be deleted, including the name of the file.

  • setFileModes (list) --

    File modes that will be set as part of the merge conflict resolution.

    • (dict) --

      Information about the file mode changes.

      • filePath (string) -- [REQUIRED]

        The full path to the file, including the name of the file.

      • fileMode (string) -- [REQUIRED]

        The file mode for the file.

rtype:

dict

returns:

Response Syntax

{
    'commitId': 'string',
    'treeId': 'string'
}

Response Structure

  • (dict) --

    • commitId (string) --

      The commit ID of the merge in the destination or target branch.

    • treeId (string) --

      The tree ID of the merge in the destination or target branch.

MergeBranchesByFastForward (new) Link ¶

Merges two branches using the fast-forward merge strategy.

See also: AWS API Documentation

Request Syntax

client.merge_branches_by_fast_forward(
    repositoryName='string',
    sourceCommitSpecifier='string',
    destinationCommitSpecifier='string',
    targetBranch='string'
)
type repositoryName:

string

param repositoryName:

[REQUIRED]

The name of the repository where you want to merge two branches.

type sourceCommitSpecifier:

string

param sourceCommitSpecifier:

[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.

type destinationCommitSpecifier:

string

param destinationCommitSpecifier:

[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.

type targetBranch:

string

param targetBranch:

The branch where the merge will be applied.

rtype:

dict

returns:

Response Syntax

{
    'commitId': 'string',
    'treeId': 'string'
}

Response Structure

  • (dict) --

    • commitId (string) --

      The commit ID of the merge in the destination or target branch.

    • treeId (string) --

      The tree ID of the merge in the destination or target branch.

CreatePullRequest (updated) Link ¶
Changes (response)
{'pullRequest': {'pullRequestTargets': {'mergeMetadata': {'mergeCommitId': 'string',
                                                          'mergeOption': 'FAST_FORWARD_MERGE '
                                                                         '| '
                                                                         'SQUASH_MERGE '
                                                                         '| '
                                                                         'THREE_WAY_MERGE'}}}}

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'
)
type title:

string

param title:

[REQUIRED]

The title of the pull request. This title will be used to identify the pull request to other users in the repository.

type description:

string

param description:

A description of the pull request.

type targets:

list

param targets:

[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.

type clientRequestToken:

string

param clientRequestToken:

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.

rtype:

dict

returns:

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',
                'mergeBase': 'string',
                'mergeMetadata': {
                    'isMerged': True|False,
                    'mergedBy': 'string',
                    'mergeCommitId': 'string',
                    'mergeOption': 'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE'
                }
            },
        ],
        '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.

          • mergeBase (string) --

            The commit ID of the most recent commit that the source branch and the destination branch have in common.

          • 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.

            • mergeCommitId (string) --

              The commit ID for the merge commit, if any.

            • mergeOption (string) --

              The merge strategy used in the merge.

      • 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.

DescribePullRequestEvents (updated) Link ¶
Changes (response)
{'pullRequestEvents': {'pullRequestMergedStateChangedEventMetadata': {'mergeMetadata': {'mergeCommitId': 'string',
                                                                                        'mergeOption': 'FAST_FORWARD_MERGE '
                                                                                                       '| '
                                                                                                       'SQUASH_MERGE '
                                                                                                       '| '
                                                                                                       'THREE_WAY_MERGE'}}}}

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
)
type pullRequestId:

string

param pullRequestId:

[REQUIRED]

The system-generated ID of the pull request. To get this ID, use ListPullRequests.

type pullRequestEventType:

string

param pullRequestEventType:

Optional. The pull request event type about which you want to return information.

type actorArn:

string

param actorArn:

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.

type nextToken:

string

param nextToken:

An enumeration token that when provided in a request, returns the next batch of the results.

type maxResults:

integer

param maxResults:

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.

rtype:

dict

returns:

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',
            'pullRequestCreatedEventMetadata': {
                'repositoryName': 'string',
                'sourceCommitId': 'string',
                'destinationCommitId': 'string',
                'mergeBase': 'string'
            },
            'pullRequestStatusChangedEventMetadata': {
                'pullRequestStatus': 'OPEN'|'CLOSED'
            },
            'pullRequestSourceReferenceUpdatedEventMetadata': {
                'repositoryName': 'string',
                'beforeCommitId': 'string',
                'afterCommitId': 'string',
                'mergeBase': 'string'
            },
            'pullRequestMergedStateChangedEventMetadata': {
                'repositoryName': 'string',
                'destinationReference': 'string',
                'mergeMetadata': {
                    'isMerged': True|False,
                    'mergedBy': 'string',
                    'mergeCommitId': 'string',
                    'mergeOption': 'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE'
                }
            }
        },
    ],
    '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.

        • pullRequestCreatedEventMetadata (dict) --

          Information about the source and destination branches for the pull request.

          • repositoryName (string) --

            The name of the repository where the pull request was created.

          • sourceCommitId (string) --

            The commit ID on the source branch used when the pull request was created.

          • destinationCommitId (string) --

            The commit ID of the tip of the branch specified as the destination branch when the pull request was created.

          • mergeBase (string) --

            The commit ID of the most recent commit that the source branch and the destination branch have in common.

        • 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.

          • mergeBase (string) --

            The commit ID of the most recent commit that the source branch and the destination branch have in common.

        • 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.

            • mergeCommitId (string) --

              The commit ID for the merge commit, if any.

            • mergeOption (string) --

              The merge strategy used in the merge.

    • nextToken (string) --

      An enumeration token that can be used in a request to return the next batch of the results.

GetMergeConflicts (updated) Link ¶
Changes (request, response)
Request
{'conflictDetailLevel': 'FILE_LEVEL | LINE_LEVEL',
 'conflictResolutionStrategy': 'NONE | ACCEPT_SOURCE | ACCEPT_DESTINATION | '
                               'AUTOMERGE',
 'maxConflictFiles': 'integer',
 'mergeOption': {'THREE_WAY_MERGE', 'SQUASH_MERGE'},
 'nextToken': 'string'}
Response
{'baseCommitId': 'string',
 'conflictMetadataList': [{'contentConflict': 'boolean',
                           'fileModeConflict': 'boolean',
                           'fileModes': {'base': 'EXECUTABLE | NORMAL | '
                                                 'SYMLINK',
                                         'destination': 'EXECUTABLE | NORMAL | '
                                                        'SYMLINK',
                                         'source': 'EXECUTABLE | NORMAL | '
                                                   'SYMLINK'},
                           'filePath': 'string',
                           'fileSizes': {'base': 'long',
                                         'destination': 'long',
                                         'source': 'long'},
                           'isBinaryFile': {'base': 'boolean',
                                            'destination': 'boolean',
                                            'source': 'boolean'},
                           'mergeOperations': {'destination': 'A | M | D',
                                               'source': 'A | M | D'},
                           'numberOfConflicts': 'integer',
                           'objectTypeConflict': 'boolean',
                           'objectTypes': {'base': 'FILE | DIRECTORY | '
                                                   'GIT_LINK | SYMBOLIC_LINK',
                                           'destination': 'FILE | DIRECTORY | '
                                                          'GIT_LINK | '
                                                          'SYMBOLIC_LINK',
                                           'source': 'FILE | DIRECTORY | '
                                                     'GIT_LINK | '
                                                     'SYMBOLIC_LINK'}}],
 'nextToken': 'string'}

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'|'SQUASH_MERGE'|'THREE_WAY_MERGE',
    conflictDetailLevel='FILE_LEVEL'|'LINE_LEVEL',
    maxConflictFiles=123,
    conflictResolutionStrategy='NONE'|'ACCEPT_SOURCE'|'ACCEPT_DESTINATION'|'AUTOMERGE',
    nextToken='string'
)
type repositoryName:

string

param repositoryName:

[REQUIRED]

The name of the repository where the pull request was created.

type destinationCommitSpecifier:

string

param destinationCommitSpecifier:

[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.

type sourceCommitSpecifier:

string

param sourceCommitSpecifier:

[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.

type mergeOption:

string

param mergeOption:

[REQUIRED]

The merge option or strategy you want to use to merge the code.

type conflictDetailLevel:

string

param conflictDetailLevel:

The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which will return a not mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict will be considered not mergeable if the same file in both branches has differences on the same line.

type maxConflictFiles:

integer

param maxConflictFiles:

The maximum number of files to include in the output.

type conflictResolutionStrategy:

string

param conflictResolutionStrategy:

Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation will be successful.

type nextToken:

string

param nextToken:

An enumeration token that when provided in a request, returns the next batch of the results.

rtype:

dict

returns:

Response Syntax

{
    'mergeable': True|False,
    'destinationCommitId': 'string',
    'sourceCommitId': 'string',
    'baseCommitId': 'string',
    'conflictMetadataList': [
        {
            'filePath': 'string',
            'fileSizes': {
                'source': 123,
                'destination': 123,
                'base': 123
            },
            'fileModes': {
                'source': 'EXECUTABLE'|'NORMAL'|'SYMLINK',
                'destination': 'EXECUTABLE'|'NORMAL'|'SYMLINK',
                'base': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
            },
            'objectTypes': {
                'source': 'FILE'|'DIRECTORY'|'GIT_LINK'|'SYMBOLIC_LINK',
                'destination': 'FILE'|'DIRECTORY'|'GIT_LINK'|'SYMBOLIC_LINK',
                'base': 'FILE'|'DIRECTORY'|'GIT_LINK'|'SYMBOLIC_LINK'
            },
            'numberOfConflicts': 123,
            'isBinaryFile': {
                'source': True|False,
                'destination': True|False,
                'base': True|False
            },
            'contentConflict': True|False,
            'fileModeConflict': True|False,
            'objectTypeConflict': True|False,
            'mergeOperations': {
                'source': 'A'|'M'|'D',
                'destination': 'A'|'M'|'D'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • mergeable (boolean) --

      A Boolean value that indicates whether the code is mergeable 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.

    • baseCommitId (string) --

      The commit ID of the merge base.

    • conflictMetadataList (list) --

      A list of metadata for any conflicts found.

      • (dict) --

        Information about the metadata for a conflict in a merge operation.

        • filePath (string) --

          The path of the file that contains conflicts.

        • fileSizes (dict) --

          The file sizes of the file in the source, destination, and base of the merge.

          • source (integer) --

            The size of a file in the source of a merge or pull request.

          • destination (integer) --

            The size of a file in the destination of a merge or pull request.

          • base (integer) --

            The size of a file in the base of a merge or pull request.

        • fileModes (dict) --

          The file modes of the file in the source, destination, and base of the merge.

          • source (string) --

            The file mode of a file in the source of a merge or pull request.

          • destination (string) --

            The file mode of a file in the destination of a merge or pull request.

          • base (string) --

            The file mode of a file in the base of a merge or pull request.

        • objectTypes (dict) --

          Information about any object type conflicts in a merge operation.

          • source (string) --

            The type of the object in the source branch.

          • destination (string) --

            The type of the object in the destination branch.

          • base (string) --

            The type of the object in the base commit of the merge.

        • numberOfConflicts (integer) --

          The number of conflicts, including both hunk conflicts and metadata conflicts.

        • isBinaryFile (dict) --

          A boolean value (true or false) indicating whether the file is binary or textual in the source, destination, and base of the merge.

          • source (boolean) --

            The binary or non-binary status of file in the source of a merge or pull request.

          • destination (boolean) --

            The binary or non-binary status of a file in the destination of a merge or pull request.

          • base (boolean) --

            The binary or non-binary status of a file in the base of a merge or pull request.

        • contentConflict (boolean) --

          A boolean value indicating whether there are conflicts in the content of a file.

        • fileModeConflict (boolean) --

          A boolean value indicating whether there are conflicts in the file mode of a file.

        • objectTypeConflict (boolean) --

          A boolean value (true or false) indicating whether there are conflicts in the object type of a file.

        • mergeOperations (dict) --

          Whether an add, modify, or delete operation caused the conflict between the source and destination of the merge.

          • source (string) --

            The operation on a file (add, modify, or delete) of a file in the source of a merge or pull request.

          • destination (string) --

            The operation on a file in the destination of a merge or pull request.

    • nextToken (string) --

      An enumeration token that can be used in a request to return the next batch of the results.

GetPullRequest (updated) Link ¶
Changes (response)
{'pullRequest': {'pullRequestTargets': {'mergeMetadata': {'mergeCommitId': 'string',
                                                          'mergeOption': 'FAST_FORWARD_MERGE '
                                                                         '| '
                                                                         'SQUASH_MERGE '
                                                                         '| '
                                                                         'THREE_WAY_MERGE'}}}}

Gets information about a pull request in a specified repository.

See also: AWS API Documentation

Request Syntax

client.get_pull_request(
    pullRequestId='string'
)
type pullRequestId:

string

param pullRequestId:

[REQUIRED]

The system-generated ID of the pull request. To get this ID, use ListPullRequests.

rtype:

dict

returns:

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',
                'mergeBase': 'string',
                'mergeMetadata': {
                    'isMerged': True|False,
                    'mergedBy': 'string',
                    'mergeCommitId': 'string',
                    'mergeOption': 'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE'
                }
            },
        ],
        '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.

          • mergeBase (string) --

            The commit ID of the most recent commit that the source branch and the destination branch have in common.

          • 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.

            • mergeCommitId (string) --

              The commit ID for the merge commit, if any.

            • mergeOption (string) --

              The merge strategy used in the merge.

      • 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.

MergePullRequestByFastForward (updated) Link ¶
Changes (response)
{'pullRequest': {'pullRequestTargets': {'mergeMetadata': {'mergeCommitId': 'string',
                                                          'mergeOption': 'FAST_FORWARD_MERGE '
                                                                         '| '
                                                                         'SQUASH_MERGE '
                                                                         '| '
                                                                         'THREE_WAY_MERGE'}}}}

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 strategy.

See also: AWS API Documentation

Request Syntax

client.merge_pull_request_by_fast_forward(
    pullRequestId='string',
    repositoryName='string',
    sourceCommitId='string'
)
type pullRequestId:

string

param pullRequestId:

[REQUIRED]

The system-generated ID of the pull request. To get this ID, use ListPullRequests.

type repositoryName:

string

param repositoryName:

[REQUIRED]

The name of the repository where the pull request was created.

type sourceCommitId:

string

param sourceCommitId:

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.

rtype:

dict

returns:

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',
                'mergeBase': 'string',
                'mergeMetadata': {
                    'isMerged': True|False,
                    'mergedBy': 'string',
                    'mergeCommitId': 'string',
                    'mergeOption': 'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE'
                }
            },
        ],
        '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.

          • mergeBase (string) --

            The commit ID of the most recent commit that the source branch and the destination branch have in common.

          • 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.

            • mergeCommitId (string) --

              The commit ID for the merge commit, if any.

            • mergeOption (string) --

              The merge strategy used in the merge.

      • 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.

UpdatePullRequestDescription (updated) Link ¶
Changes (response)
{'pullRequest': {'pullRequestTargets': {'mergeMetadata': {'mergeCommitId': 'string',
                                                          'mergeOption': 'FAST_FORWARD_MERGE '
                                                                         '| '
                                                                         'SQUASH_MERGE '
                                                                         '| '
                                                                         'THREE_WAY_MERGE'}}}}

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'
)
type pullRequestId:

string

param pullRequestId:

[REQUIRED]

The system-generated ID of the pull request. To get this ID, use ListPullRequests.

type description:

string

param description:

[REQUIRED]

The updated content of the description for the pull request. This content will replace the existing description.

rtype:

dict

returns:

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',
                'mergeBase': 'string',
                'mergeMetadata': {
                    'isMerged': True|False,
                    'mergedBy': 'string',
                    'mergeCommitId': 'string',
                    'mergeOption': 'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE'
                }
            },
        ],
        '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.

          • mergeBase (string) --

            The commit ID of the most recent commit that the source branch and the destination branch have in common.

          • 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.

            • mergeCommitId (string) --

              The commit ID for the merge commit, if any.

            • mergeOption (string) --

              The merge strategy used in the merge.

      • 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.

UpdatePullRequestStatus (updated) Link ¶
Changes (response)
{'pullRequest': {'pullRequestTargets': {'mergeMetadata': {'mergeCommitId': 'string',
                                                          'mergeOption': 'FAST_FORWARD_MERGE '
                                                                         '| '
                                                                         'SQUASH_MERGE '
                                                                         '| '
                                                                         'THREE_WAY_MERGE'}}}}

Updates the status of a pull request.

See also: AWS API Documentation

Request Syntax

client.update_pull_request_status(
    pullRequestId='string',
    pullRequestStatus='OPEN'|'CLOSED'
)
type pullRequestId:

string

param pullRequestId:

[REQUIRED]

The system-generated ID of the pull request. To get this ID, use ListPullRequests.

type pullRequestStatus:

string

param pullRequestStatus:

[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.

rtype:

dict

returns:

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',
                'mergeBase': 'string',
                'mergeMetadata': {
                    'isMerged': True|False,
                    'mergedBy': 'string',
                    'mergeCommitId': 'string',
                    'mergeOption': 'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE'
                }
            },
        ],
        '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.

          • mergeBase (string) --

            The commit ID of the most recent commit that the source branch and the destination branch have in common.

          • 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.

            • mergeCommitId (string) --

              The commit ID for the merge commit, if any.

            • mergeOption (string) --

              The merge strategy used in the merge.

      • 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.

UpdatePullRequestTitle (updated) Link ¶
Changes (response)
{'pullRequest': {'pullRequestTargets': {'mergeMetadata': {'mergeCommitId': 'string',
                                                          'mergeOption': 'FAST_FORWARD_MERGE '
                                                                         '| '
                                                                         'SQUASH_MERGE '
                                                                         '| '
                                                                         'THREE_WAY_MERGE'}}}}

Replaces the title of a pull request.

See also: AWS API Documentation

Request Syntax

client.update_pull_request_title(
    pullRequestId='string',
    title='string'
)
type pullRequestId:

string

param pullRequestId:

[REQUIRED]

The system-generated ID of the pull request. To get this ID, use ListPullRequests.

type title:

string

param title:

[REQUIRED]

The updated title of the pull request. This will replace the existing title.

rtype:

dict

returns:

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',
                'mergeBase': 'string',
                'mergeMetadata': {
                    'isMerged': True|False,
                    'mergedBy': 'string',
                    'mergeCommitId': 'string',
                    'mergeOption': 'FAST_FORWARD_MERGE'|'SQUASH_MERGE'|'THREE_WAY_MERGE'
                }
            },
        ],
        '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.

          • mergeBase (string) --

            The commit ID of the most recent commit that the source branch and the destination branch have in common.

          • 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.

            • mergeCommitId (string) --

              The commit ID for the merge commit, if any.

            • mergeOption (string) --

              The merge strategy used in the merge.

      • 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.