Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/316.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 列出存储库中的所有问题_Java_Github_Github Api - Fatal编程技术网

Java 列出存储库中的所有问题

Java 列出存储库中的所有问题,java,github,github-api,Java,Github,Github Api,我想将所有问题列在所有组织下的所有存储库中。 我尝试了以下代码: GitHubClient client = new GitHubClient(host); client.setCredentials(user_name, password); RepositoryService repository = new RepositoryService(client); IssueService issues = new IssueService(c

我想将所有问题列在所有组织下的所有存储库中。 我尝试了以下代码:

GitHubClient client = new GitHubClient(host);
        client.setCredentials(user_name, password);

        RepositoryService repository = new RepositoryService(client);
        IssueService issues = new IssueService(client);

        OrganizationService organization = new OrganizationService(client);

        List<Repository> orgRepositories = repository.getOrgRepositories("eMerchantPay");

        for (int i = 0; i < orgRepositories.size(); i++) {
            Repository get = orgRepositories.get(i);
            String name = get.getName();
            System.out.println("Repository name " + name);

            Map<String, String> map = new HashMap<>();
            List<Issue> issues1 = issues.getIssues(user_name, name, map);

            for (int x = 0; x < issues1.size(); x++) {
                Issue get1 = issues1.get(x);
                String title = get1.getTitle();
                System.out.println("Issue name " + title);
            }

        }
GitHubClient-client=新的GitHubClient(主机);
客户端.setCredentials(用户名、密码);
RepositoryService repository=新的RepositoryService(客户端);
IssueService issues=新的IssueService(客户端);
OrganizationService组织=新的OrganizationService(客户端);
List orgRepositories=repository.getOrgRepositories(“eMerchantPay”);
对于(int i=0;i
如何使用org.eclipse.egit.github.core库实现这一点?

您可以使用它获取给定回购的所有问题

请参阅,您将从中获得问题页面:

IssueService service = new IssueService(client);
Map<String, String> params = new HashMap<String, String>();
params.put(IssueService.FILTER_STATE, IssueService.STATE_CLOSED);
PageIterator<Issue> iterator = service.pageIssues("schacon", "showoff",
        params, 1);
IssueService服务=新的IssueService(客户端);
Map params=新的HashMap();
参数put(IssueService.FILTER_状态,IssueService.STATE_关闭);
PageIterator迭代器=service.pageIssues(“schacon”,“showoff”,
参数1);