kevva / github-repositories

Get all GitHub repos from a user or an organization
MIT License
37 stars 11 forks source link

Add support for organizations #10

Closed RichardLitt closed 4 years ago

RichardLitt commented 7 years ago

There is an issue currently where private repositories from an organization are not available through the users/ endpoint. This check fixes that by first getting the type of the user requested, and udpating the request appropriately.

RichardLitt commented 7 years ago

No idea why the tests are failing. They work for me locally.

SamVerschueren commented 7 years ago

The is-github-user-or-org package fails. For more information, see https://travis-ci.org/kevva/github-repositories/jobs/208712263.

Error: Not a GitHub user.

RichardLitt commented 7 years ago

@SamVerschueren The package doesn't fail on travis when a GITHUB_TOKEN is set; I'm not sure why it is failing here, as I'm using the same key as was used in the tests in this repo. Any ideas?

SamVerschueren commented 7 years ago

I will try to check it tomorrow.

RichardLitt commented 7 years ago

Thanks. Just retriggered the build since I fixed the tests on the main is-github-user-or-org branch, we'll see.

RichardLitt commented 7 years ago

Passed. :D

RichardLitt commented 7 years ago

Looking closer at the API, there perhaps ought to be another fix.

https://developer.github.com/v3/repos/#list-user-repositories

Normally, only the public repos for a user are returned with this module. If we're going to include orgs in order to get all, we should enable the option to specify the other parameters, too. Should I do that here, or in another PR?

RichardLitt commented 5 years ago

Ran across this again today. Any way to get this working?

kevva commented 4 years ago

@RichardLitt, sorry for taking so long reviewing this. Looks good, thanks!

RichardLitt commented 4 years ago

You do you man. Open source means come back whenever. All good!

kevva commented 4 years ago

I completely agree! Anyway, should be published as of 3.1.0!