Sha256: 1c8d13d30b9600203618f07474c0bfbc5a4dc2a30fce4ddf1e5c1761a36c8509

Contents?: true

Size: 1.2 KB

Versions: 11

Compression:

Stored size: 1.2 KB

Contents

# encoding: utf-8

module GithubCLI
  class Commands::Organizations < Command

    namespace :org

    desc 'list [--user=<name>]', 'List public and private organizations for the authenticated user'
    method_option :user, :type => :string, :aliases => ["-u"],
                  :desc => 'List all public organizations for a user',
                  :banner => '<user>'
    def list
      options[:params]['user'] = options[:user] if options[:user]
      Organization.list options[:params], options[:format]
    end

    desc 'get <org>', 'Get properties for a single organization'
    def get(org)
      Organization.get org, options[:params], options[:format]
    end

    desc 'edit <org>', 'Edit organization'
    long_desc <<-DESC
      Parameters

      billing_email - Optional string - Billing email address. This address is not publicized.\n
      company - Optional string\n
      email - Optional string\n
      location - Optional string\n
      name - Optional string\n

      Example

      ghc org edit rails --params=name:github company:GitHub email:support@github.com
    DESC
    def edit(org)
      Organization.edit org, options[:params], options[:format]
    end

  end # Organizations
end # GithubCLI

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
github_cli-0.5.9 lib/github_cli/commands/organizations.rb
github_cli-0.5.8 lib/github_cli/commands/organizations.rb
github_cli-0.5.7 lib/github_cli/commands/organizations.rb
github_cli-0.5.6 lib/github_cli/commands/organizations.rb
github_cli-0.5.5 lib/github_cli/commands/organizations.rb
github_cli-0.5.4 lib/github_cli/commands/organizations.rb
github_cli-0.5.3 lib/github_cli/commands/organizations.rb
github_cli-0.5.2 lib/github_cli/commands/organizations.rb
github_cli-0.5.1 lib/github_cli/commands/organizations.rb
github_cli-0.5.0 lib/github_cli/commands/organizations.rb
github_cli-0.4.4 lib/github_cli/commands/organizations.rb