class Github::Repos
def create_repo(*args)
@github.repos.create_repo :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,
"public": true,
"homepage": "https://github.com",
"description": "This is your first repo",
@github.repos.create_repo "name" => 'repo-name'
@github = Github.new
= Examples
: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
:public - Optional boolean - true to create public repo, false to create a private one
:homepage - Optional string
:description - Optional string
:name - Required string
= Parameters
Create a new repository for the autheticated user.
def create_repo(*args) params = args.last.is_a?(Hash) ? args.pop : {} _normalize_params_keys(params) _filter_params_keys(VALID_REPO_OPTIONS + %w[ org ], params) raise ArgumentError, "Required params are: :name" unless _validate_inputs(%w[ name ], params) # Requires authenticated user if (org = params.delete("org")) post("/orgs/#{org}/repos", DEFAULT_REPO_OPTIONS.merge(params)) else post("/user/repos", DEFAULT_REPO_OPTIONS.merge(params)) end end