Skip to content

Commit

Permalink
print out list of all org members
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravi Gadhia committed Apr 4, 2019
1 parent e9c2177 commit 31aeadf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions api/ruby/find-inactive-members/find_inactive_members.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,16 @@ def member_activity
info "...#{@repos_completed}/#{@repositories.length} repos completed\n"
end

# open a new csv for output
CSV.open("org_members.csv", "wb") do |csv|
# iterate and print inactive members
@members.each do |member|
member_detail = "#{member[:login]},#{member[:email] unless member[:email].nil?}"
info "#{member_detail} is an org member\n"
csv << [member_detail]
end
end

# open a new csv for output
CSV.open("inactive_users.csv", "wb") do |csv|
# iterate and print inactive members
Expand Down

0 comments on commit 31aeadf

Please sign in to comment.