Sha256: 86102c4b0fff2e0b6d0bf6e07ac228db86f205617d78040b27f951cb2e257e78

Contents?: true

Size: 665 Bytes

Versions: 1

Compression:

Stored size: 665 Bytes

Contents

require "thor"
require "codeinventory"
require "codeinventory/github"

module CodeInventory
  module CLI
    class App < Thor
      desc "github GITHUB_ACCESS_TOKEN GITHUB_ORG [OPTIONS]", "Build an inventory from GitHub"
      option :overrides, aliases: "-o", type: :hash, default: {}
      option :exclude, aliases: "-e", type: :array, default: []
      def github(access_token, org)
        source = CodeInventory::GitHub.new({ access_token: access_token }, org, overrides: options[:overrides], exclude: options[:exclude])
        inventory = CodeInventory::Inventory.new(source)
        puts JSON.pretty_generate(inventory.projects)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
codeinventory-github-0.1.9 lib/codeinventory_plugin.rb