Class: Gerrit::Command::Members

Inherits:
Base
  • Object
show all
Defined in:
lib/gerrit/command/members.rb

Overview

Lists members of a group.

This allows you to list the members of a group by regex.

Instance Method Summary collapse

Methods inherited from Base

#execute_command, from_arguments, #initialize, #run

Methods included from Utils

camel_case, commit_hash?, human_time, map_in_parallel, snake_case

Constructor Details

This class inherits a constructor from Gerrit::Command::Base

Instance Method Details

#executeObject



6
7
8
9
10
11
12
13
14
# File 'lib/gerrit/command/members.rb', line 6

def execute
  users = client.group_members(find_group)

  ui.table(header: %w[ID Username Name Email]) do |t|
    users.each do |user|
      t << [user[:id], user[:username], user[:full_name], user[:email]]
    end
  end
end