我希望以“自”开始过滤问题
参考: https://developer.github.com/v3/issues/#list-issues
这是我的代码:
GHRepository repo = null;
try {
repo = github.getRepository(repoName);
} catch (FileNotFoundException e) {
exe.printMessageAndExitFail("Repository not found");
}
List<GHPullRequest> pullRequests = repo
.getPullRequests(GHIssueState.ALL);
int max = pullRequests.stream().mapToInt(GHPullRequest::getNumber).max()
.orElse(1);
int digits = Integer.toString(max).length();
for (GHPullRequest pullRequest : pullRequests) {
System.out.println(String.format("%s (%s, %s): %s",
Util.padFront(pullRequest.getNumber(), digits),
pullRequest.getNumber(),
Util.format(pullRequest.getCreatedAt()),
Util.padTail(pullRequest.getState(), 6),
pullRequest.getTitle()));
}
欣赏所有指针