Class: Gitomator::Task::UpdateRepoAccessPermissions
- Defined in:
- lib/gitomator/task/update_repo_access_permissions.rb
Instance Attribute Summary
Attributes inherited from BaseTask
Instance Method Summary collapse
-
#initialize(context, repo_name, user2perm, team2perm, opts = {}) ⇒ UpdateRepoAccessPermissions
constructor
A new instance of UpdateRepoAccessPermissions.
- #run ⇒ Object
Methods inherited from BaseTask
Constructor Details
#initialize(context, repo_name, user2perm, team2perm, opts = {}) ⇒ UpdateRepoAccessPermissions
Returns a new instance of UpdateRepoAccessPermissions.
16 17 18 19 20 21 22 |
# File 'lib/gitomator/task/update_repo_access_permissions.rb', line 16 def initialize(context, repo_name, user2perm, team2perm, opts={}) super(context) @repo_name = repo_name @user2perm = user2perm || {} @team2perm = team2perm || {} @opts = opts end |
Instance Method Details
#run ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/gitomator/task/update_repo_access_permissions.rb', line 26 def run @user2perm.each do |username, | logger.info("Granting user #{username} #{} permission to #{@repo_name}") hosting.(username, @repo_name, ) end @team2perm.each do |team_name, | logger.info("Granting team #{team_name} #{} permission to #{@repo_name}") hosting.(team_name, @repo_name, ) end end |