Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Github Api Laravel Package

knplabs/github-api

Lightweight, well-tested PHP wrapper for GitHub APIs v3 (REST) and v4 (GraphQL). PSR-17/PSR-18 compatible via HTTPlug, with easy setup using Guzzle, Symfony HttpClient, or other PSR clients. Supports framework integrations (Laravel via graham-campbell/github).

View on GitHub
Deep Wiki
Context7

Pull Requests / Review Comments API

Back to the "Pull Requests API" | Back to the navigation

Review Comments are comments on a portion of the unified diff. These are separate from Commit Comments (which are applied directly to a commit, outside of the Pull Request view), and Issue Comments (which do not reference a portion of the unified diff).

Wraps GitHub PR Review Comments API.

Note: New comments are assigned to the authenticated user.

List all comments for selected pull request

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

$comments contains an array of review comments in selected pull-request for this repository.

Show one comment

$comment = $client->api('pull_request')->comments()->show('KnpLabs', 'php-github-api', 15);

The last parameter of this call, Review Comment ID.

Populated with full details

Requires authentication.

$comment = $client->api('pull_request')->comments()->create('KnpLabs', 'php-github-api', 8, array(
    'body'      => 'Nice change',
    'commit_id' => 'da6e3879b5658908c3cdf562dacbc458675586ca',
    'path'      => 'README.markdown',
    'position'  => 37,
    'line'      => 31
));

This returns the details of the comment.

Populated as a reply to another comment

Requires authentication.

$comment = $client->api('pull_request')->comments()->create('KnpLabs', 'php-github-api', 8, array(
    'body'        => 'Yeah! Really nice change',
    'in_reply_to' => 2
));

This returns the details of the comment.

Update comment details

Requires authentication.

$comment = $client->api('pull_request')->comments()->update('KnpLabs', 'php-github-api', 2, array(
    'body' => 'Hell Yeah! Awesome change!'
));

This returns the details of the updated comment.

Remove a review comment from a pull request

Requires authentication.

$client->api('pull_request')->comments()->remove('KnpLabs', 'php-github-api', 2);

Remove a comment from the pull request by username, repo, comment number.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation