mirror of
https://github.com/michenriksen/gitrob.git
synced 2026-05-07 00:39:19 -05:00
Fix bug causing private organization repositories to not be collected
This commit is contained in:
@@ -82,9 +82,15 @@ module Gitrob
|
||||
end
|
||||
|
||||
def get_repositories(owner)
|
||||
github_client do |client|
|
||||
client.repos.list(
|
||||
:user => owner["login"]).reject { |r| r["fork"] }
|
||||
if owner["type"] == "Organization"
|
||||
github_client do |client|
|
||||
client.repos.list(:org => owner["login"], :type => "sources")
|
||||
end
|
||||
else
|
||||
github_client do |client|
|
||||
client.repos.list(
|
||||
:user => owner["login"]).reject { |r| r["fork"] }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user