class Github::Issues

def assignees(options={}, &block)

Access to Issues::Assignees API
def assignees(options={}, &block)
  @assignees ||= ApiFactory.new('Issues::Assignees', current_options.merge(options), &block)
end

def comments(options={}, &block)

Access to Issues::Comments API
def comments(options={}, &block)
  @comments ||= ApiFactory.new('Issues::Comments', current_options.merge(options), &block)
end

def create(*args)


]
"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 are silently dropped otherwise.
Only users with push access can set labels for new issues.
:labels - Optional array of strings - Labels to associate with this issue
The milestone is silently dropped otherwise.
Only users with push access can set the milestone for new issues.
:milestone - Optional number - Milestone to associate this issue with.
The assignee is silently dropped otherwise.
Only users with push access can set the assignee for new issues.
: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(*args)
  arguments(args, :required => [:user, :repo]) do
    sift VALID_ISSUE_PARAM_NAMES
    assert_required %w[ title ]
  end
  post_request("/repos/#{user}/#{repo}/issues", arguments.params)
end

def edit(*args)


]
"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', 'number'
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(*args)
  arguments(args, :required => [:user, :repo, :number]) do
    sift VALID_ISSUE_PARAM_NAMES
  end
  params = arguments.params
  patch_request("/repos/#{user}/#{repo}/issues/#{number}", params)
end

def events(options={}, &block)

Access to Issues::Events API
def events(options={}, &block)
  @events ||= ApiFactory.new('Issues::Events', current_options.merge(options), &block)
end

def get(*args)


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

Get a single issue
def get(*args)
  arguments(args, :required => [:user, :repo, :number])
  get_request("/repos/#{user}/#{repo}/issues/#{number}", arguments.params)
end

def labels(options={}, &block)

Access to Issues::Comments API
def labels(options={}, &block)
  @labels ||= ApiFactory.new('Issues::Labels', current_options.merge(options), &block)
end

def list(*args)


: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'

: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

format: YYYY-MM-DDTHH:MM:SSZ
:since - Optional string of a timestamp in ISO 8601
:direction - asc, desc, default: desc
default: created
:sort - created, updated, comments,
:mentioned String User login
:creator String User login
* * for Issues with any assigned User.
* none for Issues with no assigned User.
* String User login
:assignee
Example: bug,ui,@high
:labels - String list of comma separated Label names.
:state - open, closed, default: open
* * for Issues with any Milestone
* none for Issues with no Milestone.
* Integer Milestone number
:milestone
* all All issues the user can see
* subscribed Issues you've subscribed to updates for
* mentioned Issues mentioning you
* created Issues created by you
* assigned Issues assigned to you (default)
:filter
= Parameters

github.issues.list :user => 'user-name', :repo => 'repo-name'
github = Github.new
= Example

List issues for a repository

github.issues.list :org => 'org-name'
github = Github.new :oauth_token => '...'
= Example

List all issues for a given organization for the authenticated user.

github.issues.list :user
github = Github.new :oauth_token => '...'
= Example

authenticated user.
List all issues across owned and member repositories for the

github.issues.list
github = Github.new :oauth_token => '...'
= Example

and organization repositories.
including owned repositories, member repositories,
List all issues across all the authenticated user’s visible repositories

List your issues
def list(*args)
  params = arguments(args) do
    assert_values VALID_ISSUE_PARAM_VALUES
  end.params
  response = if (org = params.delete('org'))
    get_request("/orgs/#{org}/issues", params)
  elsif (user_name = params.delete('user')) &&
        (repo_name = params.delete('repo'))
    list_repo user_name, repo_name, params
  elsif args.include? :user
    get_request("/user/issues", params)
  else
    get_request("/issues", params)
  end
  return response unless block_given?
  response.each { |el| yield el }
end

def list_repo(*args)

def list_repo(user_name, repo_name, params)

List issues for a repository
def list_repo(*args)
  arguments(args, :required => [:user, :repo]) do
    sift VALID_ISSUE_PARAM_NAMES
    assert_values VALID_ISSUE_PARAM_VALUES
  end
  get_request("/repos/#{user}/#{repo}/issues", arguments.params)
end

def milestones(options={}, &block)

Access to Issues::Comments API
def milestones(options={}, &block)
  @milestones ||= ApiFactory.new('Issues::Milestones', current_options.merge(options), &block)
end