Sha256: d10ba97f5791b16f85e8fa106f207237edd73324710220d5444c3118e9930fc0

Contents?: true

Size: 631 Bytes

Versions: 1

Compression:

Stored size: 631 Bytes

Contents

module Gerd
  module Inspections
    module Actions
      
      class DeleteRepo

        def initialize(repo_to_delete, organisation)
          @org = organisation
          @repo = repo_to_delete
        end

        def invoke(client, options = {})
         if !options[:delete]
           puts "You must explicitly use the --delete option to delete repos"
           return
          end
          opts = {
            :organization => @org
          }
          repo_name = "#{@org}/#{@repo}"
          puts "Deleting #{repo_name}"
          client.delete_repository(repo_name, 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/delete_repo.rb