class Github::Issues

def comments

Access to Issues::Comments API
def comments
  @comments ||= ApiFactory.new 'Issues::Comments'
end

def create(user_name, repo_name, params={})


]
"Label2"
"Label1",
"labels" => [
"milestone" => 1,
"assignee" => "octocat",
"body" => "I'm having a problem with this.",
"title" => "Found a bug",
github.issues.create
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(user_name, repo_name, 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)
  assert_required_keys(%w[ title ], params)
  post_request("/repos/#{user}/#{repo}/issues", params)
end

def edit(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.edit '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(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_ISSUE_PARAM_NAMES, params)
  patch_request("/repos/#{user}/#{repo}/issues/#{issue_id}", params)
end

def events

Access to Issues::Events API
def events
  @events ||= ApiFactory.new 'Issues::Events'
end

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


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

Get a single issue
def get(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_request("/repos/#{user}/#{repo}/issues/#{issue_id}", params)
end

def initialize(options = {})

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

def labels

Access to Issues::Comments API
def labels
  @labels ||= ApiFactory.new 'Issues::Labels'
end

def list(*args)


:direction => 'asc'
:sort => 'comments',
:labels => "bug,ui,bla",
:state => 'open',
:filter => 'created',
github.issues.list :since => '2011-04-12T12:12:12Z',
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 list(*args)
  params = args.extract_options!
  _normalize_params_keys(params)
  _filter_params_keys(VALID_ISSUE_PARAM_NAMES, params)
  # _merge_mime_type(:issue, params)
  assert_valid_values(VALID_ISSUE_PARAM_VALUES, params)
  response = get_request("/issues", params)
  return response unless block_given?
  response.each { |el| yield el }
end

def list_repo(user_name, repo_name, params={})


:direction => 'asc'
:sort => 'comments',
:labels => "bug,ui,bla",
:mentioned => 'octocat',
:assignee => '*',
:state => 'open',
github.issues.list_repo :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 list_repo(user_name, repo_name, 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)
  assert_valid_values(VALID_ISSUE_PARAM_VALUES, params)
  response = get_request("/repos/#{user}/#{repo}/issues", params)
  return response unless block_given?
  response.each { |el| yield el }
end

def milestones

Access to Issues::Comments API
def milestones
  @milestones ||= ApiFactory.new 'Issues::Milestones'
end