module Octokit::Client::Issues
def create_issue(repo, title, body = nil, options = {})
- Example: Create a new Issues for a repository -
Other tags:
- See: https://developer.github.com/v3/issues/#create-an-issue -
Returns:
-
(Sawyer::Resource)- Your newly created issue
Options Hash:
(**options)-
:labels(String) -- List of comma separated Label names. Example: bug,ui,@high. -
:milestone(Integer) -- Milestone number. -
:assignees(Array) -- User login. -
:assignee(String) -- User login.
Parameters:
-
options(Hash) -- A customizable set of options. -
body(String) -- An optional concise description -
title(String) -- A descriptive title -
repo(Integer, String, Repository, Hash) -- A GitHub repository
def create_issue(repo, title, body = nil, options = {}) options[:labels] = case options[:labels] when String options[:labels].split(',').map(&:strip) when Array options[:labels] else [] end parameters = { title: title } parameters[:body] = body unless body.nil? post "#{Repository.path repo}/issues", options.merge(parameters) end