use of software.amazon.awssdk.services.codecommit.CodeCommitClient in project aws-doc-sdk-examples by awsdocs.
the class GetPullRequest method main.
public static void main(String[] args) {
final String USAGE = "\n" + "Usage:\n" + " <pullRequestId> \n\n" + "Where:\n" + " pullRequestId - the id of the pull request. \n";
if (args.length != 1) {
System.out.println(USAGE);
System.exit(1);
}
String pullRequestId = args[0];
Region region = Region.US_EAST_1;
CodeCommitClient codeCommitClient = CodeCommitClient.builder().region(region).build();
getPR(codeCommitClient, pullRequestId);
codeCommitClient.close();
}
use of software.amazon.awssdk.services.codecommit.CodeCommitClient in project aws-doc-sdk-examples by awsdocs.
the class DeleteRepository method main.
public static void main(String[] args) {
final String USAGE = "\n" + "Usage:\n" + " <repoName> \n\n" + "Where:\n" + " repoName - the name of the repository.\n";
if (args.length != 1) {
System.out.println(USAGE);
System.exit(1);
}
String repoName = args[0];
Region region = Region.US_EAST_1;
CodeCommitClient codeCommitClient = CodeCommitClient.builder().region(region).build();
deleteRepo(codeCommitClient, repoName);
codeCommitClient.close();
}
use of software.amazon.awssdk.services.codecommit.CodeCommitClient in project aws-doc-sdk-examples by awsdocs.
the class GetMergeOptions method main.
public static void main(String[] args) {
final String USAGE = "\n" + "Usage:\n" + " <repoName> <destinationReference> <sourceReference> \n\n" + "Where:\n" + " repoName - the name of the repository.\n" + " destinationReference - the branch of the repository where the pull request changes are merged.\n" + " sourceReference - the branch of the repository that contains the changes for the pull request.\n";
if (args.length != 3) {
System.out.println(USAGE);
System.exit(1);
}
String repoName = args[0];
String destinationReference = args[1];
String sourceReference = args[2];
Region region = Region.US_EAST_1;
CodeCommitClient codeCommitClient = CodeCommitClient.builder().region(region).build();
String commitId = getMergeValues(codeCommitClient, repoName, destinationReference, sourceReference);
System.out.println("The id value is " + commitId);
codeCommitClient.close();
}
use of software.amazon.awssdk.services.codecommit.CodeCommitClient in project aws-doc-sdk-examples by awsdocs.
the class GetRepository method main.
public static void main(String[] args) {
final String USAGE = "\n" + "Usage:\n" + " <repoName> \n\n" + "Where:\n" + " repoName - the name of the repository.\n";
if (args.length != 1) {
System.out.println(USAGE);
System.exit(1);
}
String repoName = args[0];
Region region = Region.US_EAST_1;
CodeCommitClient codeCommitClient = CodeCommitClient.builder().region(region).build();
getRepInformation(codeCommitClient, repoName);
codeCommitClient.close();
}
use of software.amazon.awssdk.services.codecommit.CodeCommitClient in project aws-doc-sdk-examples by awsdocs.
the class ListRepositories method main.
public static void main(String[] args) {
Region region = Region.US_EAST_1;
CodeCommitClient codeCommitClient = CodeCommitClient.builder().region(region).build();
listRepos(codeCommitClient);
codeCommitClient.close();
}
Aggregations