Method: Github::Client::Repos::Projects#create

Defined in:
lib/github_api/client/repos/projects.rb

#create(*args) ⇒ Object

Create a new project for the specified repo

Examples:

github = Github.new
github.repos.projects.create 'owner-name', 'repo-name', name: 'project-name'
github.repos.projects.create name: 'project-name', body: 'project-body', owner: 'owner-name', repo: 'repo-name'

Parameters:



51
52
53
54
55
56
57
58
59
60
# File 'lib/github_api/client/repos/projects.rb', line 51

def create(*args)
  arguments(args, required: [:owner, :repo]) do
    assert_required %w[ name ]
  end
  params = arguments.params

  params["accept"] ||= PREVIEW_MEDIA

  post_request("/repos/#{arguments.owner}/#{arguments.repo}/projects", params)
end