Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 811 Bytes

comments.md

File metadata and controls

32 lines (21 loc) · 811 Bytes

Issues / Comments API

Back to the "Issues API" | Back to the navigation

Wraps GitHub Issue Comments API.

List an issue comments

<?php

$comments = $client->api('issue')->comments()->all('KnpLabs', 'php-github-api', 4);

List an issue comments by username, repo and issue number. Returns an array of issues.

Add a comment on an issue

Note: New comments are assigned to the authenticated user.

Requires authentication.

<?php

$client->authenticate();
$client->api('issue')->comments()->create('KnpLabs', 'php-github-api', 4, array('body' => 'My new comment'));

Add a comment to the issue by username, repo and issue number and array with comment data: body and optionally title.