| title | Issues | GitHub API |
|---|
Issues leverage these custom mime types. You can read more about the use of mime types in the API here.
GET /issues
filter
: * assigned: Issues assigned to you (default)
created: Issues created by youmentioned: Issues mentioning yousubscribed: Issues you're subscribed to updates for
state
: open, closed, default: open
labels
: String list of comma separated Label names. Example:
bug,ui,@high
sort
: created, updated, comments, default: created.
direction
: asc or desc, default: desc.
since : Optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
<%= headers 200, :pagination => true %> <%= json(:issue) { |h| [h] } %>
GET /repos/:user/:repo/issues
milestone : * Integer Milestone number
nonefor Issues with no Milestone.*for Issues with any Milestone.
state
: open, closed, default: open
assignee : * String User login
nonefor Issues with no assigned User.*for Issues with any assigned User.
mentioned : String User login.
labels
: String list of comma separated Label names. Example:
bug,ui,@high
sort
: created, updated, comments, default: created
direction
: asc or desc, default: desc.
since : Optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
<%= headers 200, :pagination => true %> <%= json(:issue) { |h| [h] } %>
GET /repos/:user/:repo/issues/:number
<%= headers 200 %> <%= json :issue %>
POST /repos/:user/:repo/issues
title : Required string
body : Optional string
assignee : Optional string - Login for the user that this issue should be assigned to.
milestone : Optional number - Milestone to associate this issue with.
labels : Optional array of strings - Labels to associate with this issue.
<%= json
:title => "Found a bug",
:body => "I'm having a problem with this.",
:assignee => "octocat",
:milestone => 1,
:labels => %w(Label1 Label2)
%>
<%= headers 201, :Location => 'https://api.github.com/repos/user/repo/issues/1' %> <%= json :issue %>
PATCH /repos/:user/:repo/issues/:number
title : Optional string
body : Optional string
assignee : Optional string - Login for the user that this issue should be assigned to.
state
: Optional string - State of the issue: open or closed.
milestone : Optional number - Milestone to associate this issue with.
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.
<%= json
:title => "Found a bug",
:body => "I'm having a problem with this.",
:assignee => "octocat",
:milestone => 1,
:state => "open",
:labels => %w(Label1 Label2)
%>
<%= headers 200 %> <%= json :issue %>
These are the supported mime types for issues. You can read more about the use of mime types in the API here.
application/vnd.github.VERSION.raw+json
application/vnd.github.VERSION.text+json
application/vnd.github.VERSION.html+json
application/vnd.github.VERSION.full+json