module Github::Repos::Forks
def create_fork(user_name=nil, repo_name=nil, params={})
"org" => "github"
@github.repos.create_fork 'user-name', 'repo-name',
@github = Github.new
= Examples
* :org - Optional string - the name of the service that is being called.
= Inputs
Create a fork for the authenticated user
def create_fork(user_name=nil, repo_name=nil, params={}) _update_user_repo_params(user_name, repo_name) _validate_user_repo_params(user, repo) unless user? && repo? _normalize_params_keys(params) _filter_params_keys(%w[ org ], params) post("/repos/#{user}/#{repo}/forks", params) end
def forks(user_name=nil, repo_name=nil, params = {})
@github.repos.forks 'user-name', 'repo-name' { |hook| ... }
@github.repos.forks 'user-name', 'repo-name'
@github = Github.new
= Examples
List repository forks
def forks(user_name=nil, repo_name=nil, params = {}) _update_user_repo_params(user_name, repo_name) _validate_user_repo_params(user, repo) unless user? && repo? _normalize_params_keys(params) response = get("/repos/#{user}/#{repo}/forks", params) return response unless block_given? response.each { |el| yield el } end