KnpLabs / KnpLabs/php-github-api

projects returning empty.

Đang mở
#1,117 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
PHP
Star
2.2k
Fork
587
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hi

i'm trying to get all projects on our organisation or a repo but no matter which i tries out it just returns a empty array.
The repo is a private one, but have both made a classic token and a fined grained one. the closes i have come is getting a "Resource not accessible by personal access token" error.

So my code looks like this

```
require_once __DIR__ . '/vendor/autoload.php';

$client = new \Github\Client();
$client->authenticate('github_pat_[TOKEN]', null, Github\AuthMethod::ACCESS_TOKEN);
$repositories = $client->api('organizations')->repositories('NOVA-Intergalactic');

$projects = $client->api('org_projects')->all('NOVA-Intergalactic');
// $projects = $client->api('repo')->projects()->all('NOVA-Intergalactic', 'NovaAi');

echo '

';

print_r($projects);
echo '
';
```

The `$repositories` command does fetch the private repos, so i belive the token does have access to the private repos.

but `$projects = $client->api('org_projects')->all('NOVA-Intergalactic');` Just returns a blank array

I have also tried out `$projects = $client->api('repo')->projects()->all('NOVA-Intergalactic', 'NovaAi');`But that throws the error "Resource not accessible by personal access token"

So i'm a little unsure on where to proceed.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start with the org_projects all('NOVA-Intergalactic') and repo projects()->all('NOVA-Intergalactic', 'NovaAi') entry points shown in the issue. Compare their returned data and the reported personal-access-token error with the GitHub API permissions for the private repository and organization. Done means establishing whether the client mishandles project responses or the token lacks the required access.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
github, php
Lĩnh vực
api
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.