Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can I list my own github repos with octokit

Tags:

git

github

ruby

I have been using octokit and I can't figure out at all how to list repos from my own personal organization with octokit. I can list repos for other orgs, but I cant for the life of me cant get my own repos. I have the read docs over multiple times.

client = Octokit::Client.new(:access_token => github_access_key)
client.repos

That api call keeps listing repos from other orgs I am in, not repos from my personal organization.

like image 456
jas Avatar asked Dec 12 '25 09:12

jas


1 Answers

client.repos(client.user, affiliation: "owner")

Should do it. For a list of options, see https://developer.github.com/v3/repos/#list-your-repositories.

In case you're wondering here's the source code for the Octokit method.

like image 167
patkoperwas Avatar answered Dec 15 '25 14:12

patkoperwas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!