Skip to main content

merge_commits

Creates, updates, deletes, gets or lists a merge_commits resource.

Overview

Namemerge_commits
TypeResource
Idaws.codecommit.merge_commits

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
base_commit_idstringThe commit ID of the merge base.
destination_commit_idstringThe commit ID of the destination commit specifier that was used in the merge evaluation.
merged_commit_idstringThe 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, there is no merge commit.
source_commit_idstringThe commit ID of the source commit specifier that was used in the merge evaluation.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_merge_commitselectregionReturns information about a specified merge commit.
create_unreferenced_merge_commitinsertregion, repositoryName, sourceCommitSpecifier, destinationCommitSpecifier, mergeOptionCreates an unreferenced 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. This API cannot be used with the fast-forward merge strategy because that strategy does not create a merge commit. This unreferenced merge commit can only be accessed using the GetCommit API or through git commands such as git fetch. To retrieve this commit, you must specify its commit ID or otherwise reference it.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns information about a specified merge commit.

SELECT
base_commit_id,
destination_commit_id,
merged_commit_id,
source_commit_id
FROM aws.codecommit.merge_commits
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates an unreferenced 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. This API cannot be used with the fast-forward merge strategy because that strategy does not create a merge commit. This unreferenced merge commit can only be accessed using the GetCommit API or through git commands such as git fetch. To retrieve this commit, you must specify its commit ID or otherwise reference it.

INSERT INTO aws.codecommit.merge_commits (
repositoryName,
sourceCommitSpecifier,
destinationCommitSpecifier,
mergeOption,
conflictDetailLevel,
conflictResolutionStrategy,
authorName,
email,
commitMessage,
keepEmptyFolders,
conflictResolution,
region
)
SELECT
'{{ repositoryName }}' /* required */,
'{{ sourceCommitSpecifier }}' /* required */,
'{{ destinationCommitSpecifier }}' /* required */,
'{{ mergeOption }}' /* required */,
'{{ conflictDetailLevel }}',
'{{ conflictResolutionStrategy }}',
'{{ authorName }}',
'{{ email }}',
'{{ commitMessage }}',
{{ keepEmptyFolders }},
'{{ conflictResolution }}',
'{{ region }}'
RETURNING
commit_id,
tree_id
;