title |
---|
Issue Labels | GitHub API |
GET /repos/:user/:repo/labels
<%= headers 200 %> <%= json(:label) { |h| [h] } %>
GET /repos/:user/:repo/labels/:id
<%= headers 200 %> <%= json :label %>
POST /repos/:user/:repo/labels
name : Required string
color
: Required string - 6 character hex code, without a leading #
.
<%= json :name => "API", :color => "FFFFFF" %>
<%= headers 201, :Location => "https://api.github.com/repos/user/repo/labels/foo" %> <%= json :label %>
PATCH /repos/:user/:repo/labels/:id
name : Required string
color
: Required string - 6 character hex code, without a leading #
.
<%= json :name => "API", :color => "FFFFFF" %>
<%= headers 200 %> <%= json :label %>
DELETE /repos/:user/:repo/labels/:id
<%= headers 204 %>
GET /repos/:user/:repo/issues/:id/labels
<%= headers 200 %> <%= json(:label) { |h| [h] } %>
POST /repos/:user/:repo/issues/:id/labels
<%= json({:array => %w(Label1 Label2)}) { |h| h['array'] } %>
<%= headers 200 %> <%= json(:label) { |h| [h] } %>
DELETE /repos/:user/:repo/issues/:id/labels/:id
<%= headers 200 %> <%= json(:label) { |h| [h] } %>
PUT /repos/:user/:repo/issues/:id/labels
<%= json(:array => %w(Label1 Label2)) { |h| h['array'] } %>
Sending an empty array ([]
) will remove all Labels from the Issue.
<%= headers 200 %> <%= json(:label) { |h| [h] } %>
DELETE /repos/:user/:repo/issues/:id/labels
<%= headers 204 %>
GET /repos/:user/:repo/milestones/:id/labels
<%= headers 200 %> <%= json(:label) { |h| [h] } %>