| title | Issues | GitHub API |
|---|
- TOC {:toc}
Issues leverage these custom mime types. You can read more about the use of mime types in the API here.
List all issues across all the authenticated user's visible repositories including owned repositories, member repositories, and organization repositories:
GET /issues
List all issues across owned and member repositories for the authenticated user:
GET /user/issues
List all issues for a given organization for the authenticated user:
GET /orgs/:org/issues
filter
: * assigned: Issues assigned to you (default)
created: Issues created by youmentioned: Issues mentioning yousubscribed: Issues you're subscribed to updates forall: All issues the authenticated user can see, regardless of particpation or creation
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/:owner/: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.
creator : String User login.
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/:owner/:repo/issues/:number
<%= headers 200 %> <%= json :issue %>
POST /repos/:owner/: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/:owner/: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