Search in sources :

Example 6 with CodeCommitClient

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();
}
Also used : CodeCommitClient(software.amazon.awssdk.services.codecommit.CodeCommitClient) Region(software.amazon.awssdk.regions.Region)

Example 7 with CodeCommitClient

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();
}
Also used : CodeCommitClient(software.amazon.awssdk.services.codecommit.CodeCommitClient) Region(software.amazon.awssdk.regions.Region)

Example 8 with CodeCommitClient

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();
}
Also used : CodeCommitClient(software.amazon.awssdk.services.codecommit.CodeCommitClient) Region(software.amazon.awssdk.regions.Region)

Example 9 with CodeCommitClient

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();
}
Also used : CodeCommitClient(software.amazon.awssdk.services.codecommit.CodeCommitClient) Region(software.amazon.awssdk.regions.Region)

Example 10 with CodeCommitClient

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();
}
Also used : CodeCommitClient(software.amazon.awssdk.services.codecommit.CodeCommitClient) Region(software.amazon.awssdk.regions.Region)

Aggregations

Region (software.amazon.awssdk.regions.Region)13 CodeCommitClient (software.amazon.awssdk.services.codecommit.CodeCommitClient)13