use of software.amazon.awssdk.services.codecommit.model.GetPullRequestRequest in project aws-doc-sdk-examples by awsdocs.
the class GetPullRequest method getPR.
// snippet-start:[codecommit.java2.get_pull_request.main]
public static void getPR(CodeCommitClient codeCommitClient, String pullRequestId) {
try {
GetPullRequestRequest pullRequestRequest = GetPullRequestRequest.builder().pullRequestId(pullRequestId).build();
GetPullRequestResponse pullResponse = codeCommitClient.getPullRequest(pullRequestRequest);
System.out.println("The title of the pull request is " + pullResponse.pullRequest().title());
System.out.println("The pull request status is " + pullResponse.pullRequest().pullRequestStatus());
System.out.println("The pull request id is " + pullResponse.pullRequest().pullRequestId());
} catch (CodeCommitException e) {
System.err.println(e.getMessage());
System.exit(1);
}
}
Aggregations