Closed ff1601com closed 3 years ago
Thank you, I appreciate it. I guess you could iterate through all the org repos and get the issues for each one of them.
Yeah. That's what I thought. Thanks for answering :)
So for anyone in the future wondering how to do it. I found this way to get the job done.
Just like @tan-tan-kanarek mentioned:
Get each repository-Name in the given Organization
$repositories = $client->repos->listOrganizationRepositories('Organization');
$repositoryNames = [];
while (true) {
$page = $client->getPage();
foreach ($repos as $repo) {
$repositoryNames[] = $repo->getName();
}
if (!$client->hasNextPage())
break;
$repos = $client->getNextPage();
if ($client->getPage() == $page)
break;
}
}
After that just iterate through the repositoryNames and add your functionality:
$issueList= [];
$issueCount = 1;
foreach($repositoryNames as $repo) {
foreach($client->issues->listIssues('Owner', $repo) as $issue) {
$issueList[] = [
'index' => $issueCount,
'title' => $issue->getTitle(),
'href' => $issue->getHtmlUrl(),
...
];
$issueCount++;
}
}
Hello there,
I used your api a lot and i really like it. Yesterday I ran into an use-case where I would like to get every issue (assigned and not assigned) in an Organisation.
Is there a way to achieve this?