lib/hub/commands.rb
# Forks the current repo using the GitHub API.
#
# Returns nothing.
Forks the current repo using the GitHub API.
Returns nothing.
Forks the current repo using the GitHub API . Returns nothing .
def fork_repo
      url = API_FORK % [repo_owner, repo_name]
      response = Net::HTTP.post_form(URI(url), 'login' => github_user, 'token' => github_token)
      response.error! unless Net::HTTPSuccess === response
    end
def fork_repo url = API_FORK % [ repo_owner , repo_name ] response = Net :: HTTP . post_form ( URI ( url ) , 'login' => github_user , 'token' => github_token ) response . error! unless Net :: HTTPSuccess === response end
Forks the current repo using the GitHub API.
Forks the current repo using the GitHub API .