Sha256: b11802d8c92cda1364fa618c7dfa799d5ceb2f4a6e43960b730141a01ed3af6c
Contents?: true
Size: 735 Bytes
Versions: 1
Compression:
Stored size: 735 Bytes
Contents
module Gerd module Inspections module Actions class CreateTeam def initialize(team_name, organisation, team_opts) @team_name = team_name @org = organisation @opts = team_opts end def invoke(client, options = {}) team_name = @team_name description = @opts['description'] privacy = @opts['privacy'] repos = [] repos = @opts['repos'].collect { | repo | "#{@org}/#{repo}" } unless !@opts.has_key?('repos') opts = { :name => team_name, :repo_names => repos, :permission => 'admin' } client.create_team(@org, opts) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gerd-0.0.1 | lib/gerd/inspections/actions/create_team.rb |