org.kohsuke:github-api:如何在搜索请求时添加日期过滤器

时间:2020-01-29 16:31:09

标签: gitlab-ci

我希望以“自”开始过滤问题

参考: 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()));
    }

欣赏所有指针

0 个答案:

没有答案