pearkes / gethub

A utility for cloning and fetching your remote git repositories from GitHub.
MIT License
217 stars 266 forks source link

Update the remote repository retrieval to handle organizations. #8

Closed pearkes closed 11 years ago

pearkes commented 11 years ago

Repositories for organizations are on a different endpoint then for users. This requires us to make more requests.

Now, we go and ask for a list of organizations a user is a part of.

We then build an array of endpoints:

We then go and fetch this asynchronously. listRemoteRepositories still returns an array of Repo's, so nothing outside of github.go needed to change.

This also added a apiRequest function to make the code a bit DRY'er.

This fixes #7.

pearkes commented 11 years ago

Closed because #11 includes this.