Sha256: 996baed75c9cf966f2941e6bb05c92d13030ae88a0510c7eccf49e4446520a13

Contents?: true

Size: 521 Bytes

Versions: 5

Compression:

Stored size: 521 Bytes

Contents

require 'rubygems'
require 'githu3'
require 'thor'
require 'yaml'

module Githu3
  
  class CLI < Thor
    
    desc "issues", "get the latest issues from a repo"
    def issues repo_name
      client = Githu3::Client.new
      begin
        repo = client.repo(repo_name)
        repo.issues.map do |issue|
          puts [issue.number.to_s.ljust(5), issue.assignee.to_s.ljust(25), issue.title.to_s].join("\t|\t")
        end
      rescue => err
        puts "Error: #{err.class.name}"
      end
    end
    
  end
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
githu3-0.0.8 lib/githu3/cli.rb
githu3-0.0.7 lib/githu3/cli.rb
githu3-0.0.6 lib/githu3/cli.rb
githu3-0.0.5 lib/githu3/cli.rb
githu3-0.0.4 lib/githu3/cli.rb