Parent

Methods

Class/Module Index [+]

Quicksearch

Github::Repos::Forks

Public Instance Methods

all(*args) click to toggle source
Alias for: list
create(*args) click to toggle source

Create a fork for the authenticated user

Inputs

  • :organization - Optional string - the name of the service that is being called.

Examples

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(*args) click to toggle source

List repository forks

Parameters

  • :sort - newest, oldest, watchers, default: newest

Examples

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
Also aliased as: all

[Validate]

Generated with the Darkfish Rdoc Generator 2.