re: open source help/discussion thread (v0) VIEW POST

re: Hey, I'm looking to start work on Allow pinning of GitHub organisation projects #243 jsjlewis96 commented on Jul 11, 2018 GitHu...

I wouldn't say this is a particularly simple first Rails issue but since it's yours I think you have the other insight to make it happen.

Basically in the controller we have this defined:

@client = Octokit::Client.
          new(access_token: current_user.identities.where(provider: "github").last.token)

Octokit is the GitHub Ruby wrapper. It's been around a long time and is well-supported.

From here with @client, we currently call an octokit method to look up repos to display in the settings area.

@client.repositories.each do |repo|

I imagine to add the org repos, it'll be a matter of finding out what octokit has for that. Maybe they have a flattened way of finding all the repos, but I imagine it could be about sort of traveling up and down the object tree to get them. Hopefully it can be done efficiently.

Good luck, we can help with any bumps!

code of conduct - report abuse