class Github::Repos
def create(*args)
github.repos.create :name => 'repo-name', :org => 'organisation-name'
github = Github.new :oauth_token => '...'
Examples:
must be a member of this organisation
Create a new repository in this organisation. The authenticated user
"has_downloads": true
"has_wiki": true,
"has_issues": true,
"private": false,
"homepage": "https://github.com",
"description": "This is your first repo",
github.repos.create "name" => 'repo-name'
github = Github.new
= Examples
:team_id Optional number - The id of the team that will be granted access to this repository. This is only valid when creating a repo in an organization
:org Optional string - The organisation in which this repository will be created
:has_downloads Optional boolean - true to enable downloads for this repository
:has_wiki - Optional boolean - true to enable the wiki for this repository, false to disable it. Default is true
:has_issues - Optional boolean - true to enable issues for this repository, false to disable them
:private - Optional boolean - true to create a private repository, false to create a public one.
:homepage - Optional string
:description - Optional string
:name - Required string
= Parameters
Create a new repository for the autheticated user.
def create(*args) params = args.extract_options! normalize! params filter! VALID_REPO_OPTIONS + %w[ org ], params assert_required_keys(%w[ name ], params) # Requires authenticated user if (org = params.delete("org")) post_request("/orgs/#{org}/repos", DEFAULT_REPO_OPTIONS.merge(params)) else post_request("/user/repos", DEFAULT_REPO_OPTIONS.merge(params)) end end