Class: TeachersPet::Actions::AddCollaborators

Inherits:
Base
  • Object
show all
Defined in:
lib/teachers_pet/actions/add_collaborators.rb

Instance Attribute Summary

Attributes inherited from Base

#client, #options

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

#repositoryObject



4
5
6
# File 'lib/teachers_pet/actions/add_collaborators.rb', line 4

def repository
  self.options[:repository]
end

#runObject



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 ||
    unless self.options[:dry_run]
      result = self.client.add_collab(self.repository, )
    end
    puts "#{} - #{result}"
  end
end