Skip to content

Commit

Permalink
Merge pull request #7 from jasonpenny/show-team-members-with-no-open-prs
Browse files Browse the repository at this point in the history
Display team members with no Pull Requests at the bottom for team_prs.rb
  • Loading branch information
jasonpenny authored Feb 21, 2019
2 parents e628427 + f1c7282 commit 8c5f872
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion team_prs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,31 @@

puts "┌" + ("─" * 79)
puts "│   "
no_prs = []
team.each_with_index do |member, i|
prs = Github.pull_requests_for_login(member["login"]).reject { |pr| pr["owner"].downcase != org.downcase }

Github.puts_multiple_pull_requests(prs, { prefix: "│   " })
if !prs.empty?
Github.puts_multiple_pull_requests(prs, { prefix: "│   " })
else
no_prs << member
end

if !prs.empty? && i < team.size - 1
puts "│   "
puts "├" + ("─" * 79)
puts "│   "
end
end

no_prs.each_with_index do |member, i|
puts "│   " + Github.name_and_login(member)
puts "│   " + "No open PRs"

if i < no_prs.size - 1
puts "│   "
end
end
puts "│   "
puts "└" + ("─" * 79)
end

0 comments on commit 8c5f872

Please sign in to comment.