You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm unsure if this is user error (most likely) but I'm having issues including private repositories in the results of a repos.list call. I've tried using different scopes in the generated Personal access token, including adding one with all permissions enabled, but i am still unable to list private repositories.
require'github_api'username='deanwilson'private_repo='private-test-repo_name'config={auto_pagination: true,oauth_token: ENV['GITHUB_TOKEN'],user: username}github=Github.newconfig# get the private repo directlyfoo=github.repos.getuser: username,repo: private_repoputs"Is #{private_repo} private? #{foo.private}"# list _all_ reposrepos=github.repos.listputs"Looking through #{repos.length} repos"names=repos.map{|r| r.name}ifnames.include?private_repoputs"Found private repo in list"elseputs"Didn't find private repo in list"endprivate_repos=repos.select{|r| r.private}puts"Found #{private_repos.length} private repos"
__END__
bundle exec ruby lister
Is private-test-repo private? true
Looking through 87 repos
Didn't find private repo in list
Found 0 private repos
This is an individual github user but it is also assicatyed with a small number of orgs. I am only attempting to list the users own repos.
Any advice on this would be appreciated.
Thank you for your time.
The text was updated successfully, but these errors were encountered:
Same thing for me, tried switching user to be org but same result still can't list private repositories.
I, [2021-03-13T20:03:19.585025 #18918] INFO -- request: GET https://api.github.com/orgs/xxx/repos?type=private&per_page=50
I, [2021-03-13T20:03:19.585083 #18918] INFO -- request: Accept: "application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1"
Hello, I'm unsure if this is user error (most likely) but I'm having issues including private repositories in the results of a
repos.list
call. I've tried using different scopes in the generated Personal access token, including adding one with all permissions enabled, but i am still unable to list private repositories.This is an individual github user but it is also assicatyed with a small number of orgs. I am only attempting to list the users own repos.
Any advice on this would be appreciated.
Thank you for your time.
The text was updated successfully, but these errors were encountered: