Class: GithubIssuesCli::Command::List
- Inherits:
-
GithubIssuesCli::Command
- Object
- Clamp::Command
- GithubIssuesCli::Command
- GithubIssuesCli::Command::List
- Defined in:
- lib/github_issues_cli/command/list.rb
Instance Attribute Summary
Attributes inherited from GithubIssuesCli::Command
Instance Method Summary collapse
Methods inherited from GithubIssuesCli::Command
#authenticate, #get_git_repo, #get_github_repo, #get_issue_number, #get_source, #initialize, #run
Constructor Details
This class inherits a constructor from GithubIssuesCli::Command
Instance Method Details
permalink #execute ⇒ Object
[View source]
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/github_issues_cli/command/list.rb', line 6 def execute github_repo = get_github_repo issues_client = Github::Issues.new request = {:user => github_repo[:user], :repo => github_repo[:name]} request.store(:assignee, @username) if mine? issues = issues_client.list request issues.each do |issue| if not issue.assignee.nil? and issue.assignee.login == @username print on_yellow ' ' else print ' ' end print bold ' ' + ('#' + issue.number.to_s).rjust(6) print ' ' + issue.title puts end end |