use of software.amazon.awssdk.services.codecommit.model.GetMergeOptionsRequest in project aws-doc-sdk-examples by awsdocs.
the class GetMergeOptions method getMergeValues.
// snippet-start:[codecommit.java2.get_merge_options.main]
public static String getMergeValues(CodeCommitClient codeCommitClient, String repoName, String destinationReference, String sourceReference) {
try {
GetMergeOptionsRequest optionsRequest = GetMergeOptionsRequest.builder().repositoryName(repoName).destinationCommitSpecifier(destinationReference).sourceCommitSpecifier(sourceReference).build();
GetMergeOptionsResponse response = codeCommitClient.getMergeOptions(optionsRequest);
return response.baseCommitId();
} catch (CodeCommitException e) {
System.err.println(e.getMessage());
System.exit(1);
}
return "";
}
Aggregations