class Github::Issues

def create_issue(user_name=nil, repo_name=nil, params={})


]
"Label2"
"Label1",
"labels" => [
"milestone" => 1,
"assignee" => "octocat",
"body" => "I'm having a problem with this.",
"title" => "Found a bug",
@github.issues.create_issue
@github = Github.new :user => 'user-name', :repo => 'repo-name'
= Examples
:labels - Optional array of strings - Labels to associate with this issue
:milestone - Optional number - Milestone to associate this issue with
:assignee - Optional string - Login for the user that this issue should be assigned to.
:body - Optional string
:title - Required string
= Inputs

Create an issue
def create_issue(user_name=nil, repo_name=nil, params={})
  _update_user_repo_params(user_name, repo_name)
  _validate_user_repo_params(user, repo) unless user? && repo?
  _normalize_params_keys(params)
  # _merge_mime_type(:issue, params)
  _filter_params_keys(VALID_ISSUE_PARAM_NAMES, params)
  _validate_inputs(%w[ title ], params)
  post("/repos/#{user}/#{repo}/issues", params)
end

def edit_issue(user_name, repo_name, issue_id, params={})


]
"Label2"
"Label1",
"labels" => [
"milestone" => 1,
"assignee" => "octocat",
"body" => "I'm having a problem with this.",
"title" => "Found a bug",
@github.issues.create_issue 'user-name', 'repo-name', 'issue-id'
@github = Github.new
= Examples

:labels - Optional array of strings - Labels to associate with this issue. Pass one or more Labels to replace the set of Labels on this Issue. Send an empty array ([]) to clear all Labels from the Issue.
:milestone - Optional number - Milestone to associate this issue with
:state - Optional string - State of the issue:open or closed
:assignee - Optional string - Login for the user that this issue should be assigned to.
:body - Optional string
:title - Optional string
= Inputs

Edit an issue
def edit_issue(user_name, repo_name, issue_id, params={})
  _update_user_repo_params(user_name, repo_name)
  _validate_user_repo_params(user, repo) unless user? && repo?
  _validate_presence_of issue_id
  _normalize_params_keys(params)
  # _merge_mime_type(:issue, params)
  _filter_params_keys(VALID_MILESTONE_INPUTS, params)
  patch("/repos/#{user}/#{repo}/issues/#{issue_id}", params)
end

def initialize(options = {})

Creates new Issues API
def initialize(options = {})
  super(options)
end

def issue(user_name, repo_name, issue_id, params={})


@github.issues.get_issue 'user-name', 'repo-name', 'issue-id'
@github = Github.new
= Examples

Get a single issue
def issue(user_name, repo_name, issue_id, params={})
  _update_user_repo_params(user_name, repo_name)
  _validate_user_repo_params(user, repo) unless user? && repo?
  _validate_presence_of issue_id
  _normalize_params_keys(params)
  # _merge_mime_type(:issue, params)
  get("/repos/#{user}/#{repo}/issues/#{issue_id}", params)
end

def issues(params={})


:direction => 'asc'
:sort => 'comments',
:labels => "bug,ui,bla",
:state => 'open',
:filter => 'created',
@github.issues.issues :since => '2011-04-12312:12:121',
@github = Github.new :oauth_token => '...'
= Examples

:since - Optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
:direction - asc, desc, default: desc
:sort - created, updated, comments, default: created
:labels - String list of comma separated Label names. Example: bug,ui,@high
:state - open, closed, default: open
* subscribed: Issues assigned to you (default)
* mentioned: Issues assigned to you (default)
* created: Issues assigned to you (default)
* assigned: Issues assigned to you (default)
:filter
= Parameters

List your issues
def issues(params={})
  _normalize_params_keys(params)
  _filter_params_keys(VALID_ISSUE_PARAM_NAMES, params)
  # _merge_mime_type(:issue, params)
  _validate_params_values(VALID_ISSUE_PARAM_VALUES, params)
  response = get("/issues", params)
  return response unless block_given?
  response.each { |el| yield el }
end

def repo_issues(user_name=nil, repo_name=nil, params={})


:direction => 'asc'
:sort => 'comments',
:labels => "bug,ui,bla",
:mentioned => 'octocat',
:assignee => '*',
:state => 'open',
@github.issues.repo_issues :milestone => 1,
@github = Github.new :user => 'user-name', :repo => 'repo-name'
= Examples

:direction - asc, desc, default: desc
, default: due_date
:since - Optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
:direction - asc, desc, default: desc
:sort - created, updated, comments, default: created
:labels - String list of comma separated Label names. Example: bug,ui,@high
:mentioned String User login
* * for Issues with any assigned User.
* none for Issues with no assigned User.
* String User login
:assignee
:state - open, closed, default: open
* * for Issues with any Milestone
* none for Issues with no Milestone.
* Integer Milestone number
:milestone
= Parameters

List issues for a repository
def repo_issues(user_name=nil, repo_name=nil, params={})
  _update_user_repo_params(user_name, repo_name)
  _validate_user_repo_params(user, repo) unless user? && repo?
  _normalize_params_keys(params)
  _filter_params_keys(VALID_ISSUE_PARAM_NAMES, params)
  # _merge_mime_type(:issue, params)
  _validate_params_values(VALID_ISSUE_PARAM_VALUES, params)
  response = get("/repos/#{user}/#{repo}/issues", params)
  return response unless block_given?
  response.each { |el| yield el }
end