Is there a quicker/better way to get a GHPullRequest instance from searchIssues() results?
I have gotString sha1 and GHRepository repository instances and the following code:
final PagedSearchIterable<GHIssue> list = githubClient.searchIssues().q(sha1).list();
final GHIssue issue = list.iterator().next();
final String pullRequestUrl = issue.getPullRequest().getUrl().toString();
final int pullRequestNumber = Integer.valueOf(pullRequestUrl.substring(pullRequestUrl.lastIndexOf('/')+1));
final GHPullRequest pullRequest = repository.getPullRequest(pullRequestNumber);
Is there a quicker/better way to get a
GHPullRequestinstance fromsearchIssues()results?I have got
String sha1andGHRepository repositoryinstances and the following code: