Class: TeachersPet::Actions::AddCollaborators
- Defined in:
- lib/teachers_pet/actions/add_collaborators.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#execute, #init_client, #initialize, #octokit_config, #read_file, #read_members_file, #read_students_file
Constructor Details
This class inherits a constructor from TeachersPet::Actions::Base
Instance Method Details
#repository ⇒ Object
4 5 6 |
# File 'lib/teachers_pet/actions/add_collaborators.rb', line 4 def repository self.[:repository] end |
#run ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/teachers_pet/actions/add_collaborators.rb', line 8 def run self.init_client members = self.read_members_file members.each do |login| unless self.[:dry_run] result = self.client.add_collab(self.repository, login) end puts "#{login} - #{result}" end end |