- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
BatchDescribeMergeConflictsCommand
Returns information about one or more merge conflicts in the attempted merge of two commit specifiers using the squash or three-way merge strategy.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { CodeCommitClient, BatchDescribeMergeConflictsCommand } from "@aws-sdk/client-codecommit"; // ES Modules import
// const { CodeCommitClient, BatchDescribeMergeConflictsCommand } = require("@aws-sdk/client-codecommit"); // CommonJS import
const client = new CodeCommitClient(config);
const input = { // BatchDescribeMergeConflictsInput
repositoryName: "STRING_VALUE", // required
destinationCommitSpecifier: "STRING_VALUE", // required
sourceCommitSpecifier: "STRING_VALUE", // required
mergeOption: "FAST_FORWARD_MERGE" || "SQUASH_MERGE" || "THREE_WAY_MERGE", // required
maxMergeHunks: Number("int"),
maxConflictFiles: Number("int"),
filePaths: [ // FilePaths
"STRING_VALUE",
],
conflictDetailLevel: "FILE_LEVEL" || "LINE_LEVEL",
conflictResolutionStrategy: "NONE" || "ACCEPT_SOURCE" || "ACCEPT_DESTINATION" || "AUTOMERGE",
nextToken: "STRING_VALUE",
};
const command = new BatchDescribeMergeConflictsCommand(input);
const response = await client.send(command);
// { // BatchDescribeMergeConflictsOutput
// conflicts: [ // Conflicts // required
// { // Conflict
// conflictMetadata: { // ConflictMetadata
// filePath: "STRING_VALUE",
// fileSizes: { // FileSizes
// source: Number("long"),
// destination: Number("long"),
// base: Number("long"),
// },
// fileModes: { // FileModes
// source: "EXECUTABLE" || "NORMAL" || "SYMLINK",
// destination: "EXECUTABLE" || "NORMAL" || "SYMLINK",
// base: "EXECUTABLE" || "NORMAL" || "SYMLINK",
// },
// objectTypes: { // ObjectTypes
// source: "FILE" || "DIRECTORY" || "GIT_LINK" || "SYMBOLIC_LINK",
// destination: "FILE" || "DIRECTORY" || "GIT_LINK" || "SYMBOLIC_LINK",
// base: "FILE" || "DIRECTORY" || "GIT_LINK" || "SYMBOLIC_LINK",
// },
// numberOfConflicts: Number("int"),
// isBinaryFile: { // IsBinaryFile
// source: true || false,
// destination: true || false,
// base: true || false,
// },
// contentConflict: true || false,
// fileModeConflict: true || false,
// objectTypeConflict: true || false,
// mergeOperations: { // MergeOperations
// source: "A" || "M" || "D",
// destination: "A" || "M" || "D",
// },
// },
// mergeHunks: [ // MergeHunks
// { // MergeHunk
// isConflict: true || false,
// source: { // MergeHunkDetail
// startLine: Number("int"),
// endLine: Number("int"),
// hunkContent: "STRING_VALUE",
// },
// destination: {
// startLine: Number("int"),
// endLine: Number("int"),
// hunkContent: "STRING_VALUE",
// },
// base: {
// startLine: Number("int"),
// endLine: Number("int"),
// hunkContent: "STRING_VALUE",
// },
// },
// ],
// },
// ],
// nextToken: "STRING_VALUE",
// errors: [ // BatchDescribeMergeConflictsErrors
// { // BatchDescribeMergeConflictsError
// filePath: "STRING_VALUE", // required
// exceptionName: "STRING_VALUE", // required
// message: "STRING_VALUE", // required
// },
// ],
// destinationCommitId: "STRING_VALUE", // required
// sourceCommitId: "STRING_VALUE", // required
// baseCommitId: "STRING_VALUE",
// };
BatchDescribeMergeConflictsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
destinationCommitSpecifier Required | string | undefined | The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID). |
mergeOption Required | MergeOptionTypeEnum | undefined | The merge option or strategy you want to use to merge the code. |
repositoryName Required | string | undefined | The name of the repository that contains the merge conflicts you want to review. |
sourceCommitSpecifier Required | string | undefined | The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID). |
conflictDetailLevel | ConflictDetailLevelTypeEnum | undefined | The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line. |
conflictResolutionStrategy | ConflictResolutionStrategyTypeEnum | undefined | 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 is successful. |
filePaths | string[] | undefined | The path of the target files used to describe the conflicts. If not specified, the default is all conflict files. |
maxConflictFiles | number | undefined | The maximum number of files to include in the output. |
maxMergeHunks | number | undefined | The maximum number of merge hunks to include in the output. |
nextToken | string | undefined | An enumeration token that, when provided in a request, returns the next batch of the results. |
BatchDescribeMergeConflictsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
conflicts Required | Conflict[] | undefined | A list of conflicts for each file, including the conflict metadata and the hunks of the differences between the files. |
destinationCommitId Required | string | undefined | The commit ID of the destination commit specifier that was used in the merge evaluation. |
sourceCommitId Required | string | undefined | The commit ID of the source commit specifier that was used in the merge evaluation. |
baseCommitId | string | undefined | The commit ID of the merge base. |
errors | BatchDescribeMergeConflictsError[] | undefined | A list of any errors returned while describing the merge conflicts for each file. |
nextToken | string | undefined | An enumeration token that can be used in a request to return the next batch of the results. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
CommitDoesNotExistException | client | The specified commit does not exist or no commit was specified, and the specified repository has no default branch. |
CommitRequiredException | client | A commit was not specified. |
EncryptionIntegrityChecksFailedException | server | An encryption integrity check failed. |
EncryptionKeyAccessDeniedException | client | An encryption key could not be accessed. |
EncryptionKeyDisabledException | client | The encryption key is disabled. |
EncryptionKeyNotFoundException | client | No encryption key was found. |
EncryptionKeyUnavailableException | client | The encryption key is not available. |
InvalidCommitException | client | The specified commit is not valid. |
InvalidConflictDetailLevelException | client | The specified conflict detail level is not valid. |
InvalidConflictResolutionStrategyException | client | The specified conflict resolution strategy is not valid. |
InvalidContinuationTokenException | client | The specified continuation token is not valid. |
InvalidMaxConflictFilesException | client | The specified value for the number of conflict files to return is not valid. |
InvalidMaxMergeHunksException | client | The specified value for the number of merge hunks to return is not valid. |
InvalidMergeOptionException | client | The specified merge option is not valid for this operation. Not all merge strategies are supported for all operations. |
InvalidRepositoryNameException | client | A specified repository name is not valid. This exception occurs only when a specified repository name is not valid. Other exceptions occur when a required repository parameter is missing, or when a specified repository does not exist. |
MaximumFileContentToLoadExceededException | client | The number of files to load exceeds the allowed limit. |
MaximumItemsToCompareExceededException | client | The number of items to compare between the source or destination branches and the merge base has exceeded the maximum allowed. |
MergeOptionRequiredException | client | A merge option or stategy is required, and none was provided. |
RepositoryDoesNotExistException | client | The specified repository does not exist. |
RepositoryNameRequiredException | client | A repository name is required, but was not specified. |
TipsDivergenceExceededException | client | The divergence between the tips of the provided commit specifiers is too great to determine whether there might be any merge conflicts. Locally compare the specifiers using |
CodeCommitServiceException | Base exception class for all service exceptions from CodeCommit service. |