class Github::Client::Repos::Forks
Public Instance Methods
create(*args)
click to toggle source
Create a fork for the authenticated user
@param [Hash] params @input params [String] :organization
The organization login. The repository will be forked into this organization.
@example
github = Github.new github.repos.forks.create 'user-name', 'repo-name', organization: "github"
@api public
# File lib/github_api/client/repos/forks.rb, line 44 def create(*args) arguments(args, required: [:user, :repo]) post_request("/repos/#{arguments.user}/#{arguments.repo}/forks", arguments.params) end
list(*args) { |el| ... }
click to toggle source
List repository forks
@param [Hash] params @input params [String] :sort
The sort order. Can be either newest, oldest, or stargazers. Default: newest
@example
github = Github.new github.repos.forks.list('user-name', 'repo-name') github.repos.forks.list('user-name', 'repo-name') { |fork| #... }
@api public
# File lib/github_api/client/repos/forks.rb, line 22 def list(*args) arguments(args, required: [:user, :repo]) response = get_request("/repos/#{arguments.user}/#{arguments.repo}/forks", arguments.params) return response unless block_given? response.each { |el| yield el } end
Also aliased as: all