Class: GithubIssuesCli::Command::Push

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

Instance Attribute Summary

Attributes inherited from GithubIssuesCli::Command

#git_repo, #username

Instance Method Summary collapse

Methods inherited from GithubIssuesCli::Command

#authenticate, #get_git_push_target, #get_git_repo, #get_issue_number, #get_pullrequest, #get_source_branch, #get_upstream_repo, #initialize, #run

Constructor Details

This class inherits a constructor from GithubIssuesCli::Command

Instance Method Details

#executeObject



4
5
6
7
8
9
# File 'lib/github_issues_cli/command/push.rb', line 4

def execute
  git_repo = get_git_repo
  target = get_git_push_target
  remote, ref = target.split('/', 2)
  puts git_repo.lib.command_proxy('push', [remote, "#{git_repo.current_branch}:#{ref}"])
end