Sha256: 2a860128d70f297c52437be425965a774c3dedb00a3ee8d58540dfc17aaa5404

Contents?: true

Size: 1.02 KB

Versions: 14

Compression:

Stored size: 1.02 KB

Contents

# encoding: utf-8

module GithubCLI
  class Commands::Search < Command

    namespace :search

    desc 'issue <owner> <repo> <keyword>', 'Search issues'
    long_desc <<-DESC
      Search issues

      Parameters

      state - open or closed. \n
      keyword - search term
    DESC
    method_option :state, :type => :string, :aliases => ["-s"],
                  :desc => 'Repository name'
    def issue(owner, repo, keyword)
      Search.issue owner, repo, keyword, options[:params].update(:state => options[:state]), options[:format]
    end

    desc 'repo <keyword>', 'Repository search'
    def repo(keyword)
      Search.repo options[:params].update(:keyword => keyword), options[:format]
    end

    desc 'user <keyword>', 'User search'
    def user(keyword)
      Search.user options[:params].update(:keyword => keyword), options[:format]
    end

    desc 'email <email>', 'Email search'
    def email(email)
      Search.email options[:params].update(:email => email), options[:format]
    end

  end # Search
end # GithubCLI

Version data entries

14 entries across 14 versions & 1 rubygems

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