Class: GithubIssuesCli::Command::Comment

Inherits:
GithubIssuesCli::Command show all
Defined in:
lib/github_issues_cli/command/comment.rb

Instance Attribute Summary

Attributes inherited from GithubIssuesCli::Command

#git_repo, #username

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

#executeObject


6
7
8
9
10
11
12
# File 'lib/github_issues_cli/command/comment.rb', line 6

def execute
  github_repo = get_github_repo
  issue_number = get_issue_number
  Github::Issues.new.comments.create :user => github_repo[:user], :repo => github_repo[:name], :issue_id => issue_number, :body => body
  print on_green ' '
  puts ' Comment added'
end