Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 1 KB

labels.md

File metadata and controls

48 lines (35 loc) · 1 KB

Repo / Labels API

Back to the "Repos API" | Back to the navigation

List all labels for this repository

$labels = $client->api('repo')->labels()->all('twbs', 'bootstrap');

Get a single label

$label = $client->api('repo')->labels()->show('twbs', 'bootstrap', 'feature');

Create a label

Requires authentication.

$params = [
  'name' => 'bug',
  'color' => 'f29513',
  'description' => 'Something isn\'t working',
];
$label = $client->api('repo')->labels()->create('twbs', 'bootstrap', $params);

Update a label

Requires authentication.

$params = [
  'new_name' => 'bug :bug:',
  'color' => 'b01f26',
  'description' => 'Small bug fix required',
];
$label = $client->api('repo')->labels()->update('twbs', 'bootstrap', 'bug', $params);

Delete a label

Requires authentication.

$label = $client->api('repo')->labels()->remove('twbs', 'bootstrap', 'bug');