Sha256: 2d746f5e71271e45286da3251b8b9fabfe8fb4e58c5d53f221641b86c9de8ff3

Contents?: true

Size: 1.12 KB

Versions: 6

Compression:

Stored size: 1.12 KB

Contents

# encoding: utf-8

module GithubCLI
  class Commands::Watching < Command

    namespace :watch

    desc 'list <user> <repo>', 'Lists repo watchers'
    def list(user, repo)
      Watching.list user, repo, options[:params], options[:format]
    end

    desc 'watched', 'Lists repos being watched by a user'
    method_option :user, :type => :string, :aliases => ["-u"],
                  :desc => 'Watch repositories for <user>'
    def watched
      params = options[:params].dup
      if options[:user]
        params['user'] = options[:user]
      end
      Watching.watched params, options[:format]
    end

    desc 'watching <user> <repo>', 'Check if you are watching a repository'
    def watching(user, repo)
      Watching.watching? user, repo, options[:params], options[:format]
    end

    desc 'start <user> <repo>', 'Watch a repository'
    def start(user, repo)
      Watching.start user, repo, options[:params], options[:format]
    end

    desc 'stop <user> <repo>', 'Stop watching a repository'
    def stop(user, repo)
      Watching.stop user, repo, options[:params], options[:format]
    end

  end # Watching
end # GithubCLI

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
github_cli-0.5.9 lib/github_cli/commands/watching.rb
github_cli-0.5.8 lib/github_cli/commands/watching.rb
github_cli-0.5.7 lib/github_cli/commands/watching.rb
github_cli-0.5.6 lib/github_cli/commands/watching.rb
github_cli-0.5.5 lib/github_cli/commands/watching.rb
github_cli-0.5.4 lib/github_cli/commands/watching.rb