Permalink
Browse files

the network list now has all members, not just those in the graph. th…

…is fixes a bug with gh pull
  • Loading branch information...
1 parent 3de077d commit 44730f80b54b61dec510bd7f5242a4537f059616 @kastner kastner committed with defunkt Nov 28, 2008
Showing with 12 additions and 6 deletions.
  1. +9 −3 lib/commands/helpers.rb
  2. +3 −3 lib/commands/network.rb
@@ -245,6 +245,9 @@
"http://github.com/#{user}/#{project}/network_meta"
end
+helper :network_members_for do |user|
+ "http://github.com/#{user}/#{project}/network/members.json"
+end
helper :has_launchy? do |blk|
begin
@@ -309,9 +312,7 @@
end
helper :network_members do
- get_network_data(owner, {})['users'].map do |hash|
- hash['name']
- end
+ get_network_members(owner, {}).map {|member| member['owner']['login'] }
end
@@ -326,6 +327,11 @@
end
end
+helper :get_network_members do |user, options|
+ json = Kernel.open(network_members_for(user)).read
+ JSON.parse(json)["users"]
+end
+
helper :cache_commits do |commits|
File.open( commits_cache_path, 'w' ) do |out|
out.write(commits.to_yaml)
@@ -20,9 +20,9 @@
when 'web'
helper.open helper.network_page_for(user)
when 'list'
- data = helper.get_network_data(user, options)
- data['users'].each do |hsh|
- puts [ hsh['name'].ljust(20), hsh['heads'].map {|a| a['name']}.uniq.join(', ') ].join(' ')
+ members = helper.get_network_members(user, options)
+ members.each do |hsh|
+ puts hsh["owner"]["login"]
end
when 'fetch'
# fetch each remote we don't have

0 comments on commit 44730f8

Please sign in to comment.