Create a fork for the authenticated user
:organization
- Optional string - the name of the service that
is being called.
github = Github.new github.repos.forks.create 'user-name', 'repo-name', "organization" => "github"
# File lib/github_api/repos/forks.rb, line 34 def create(*args) arguments(args, :required => [:user, :repo]) post_request("/repos/#{user}/#{repo}/forks", arguments.params) end
List repository forks
:sort
- newest, oldest, watchers, default: newest
github = Github.new github.repos.forks.list 'user-name', 'repo-name' github.repos.forks.list 'user-name', 'repo-name' { |fork| ... }
# File lib/github_api/repos/forks.rb, line 15 def list(*args) arguments(args, :required => [:user, :repo]) response = get_request("/repos/#{user}/#{repo}/forks", arguments.params) return response unless block_given? response.each { |el| yield el } end