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

Issues API

Back to the navigation

Listing issues, searching, editing and closing your projects issues. Wraps GitHub Issue API.

Additional APIs:

List issues in a project

$issues = $client->api('issue')->all('KnpLabs', 'php-github-api', array('state' => 'open'));

Returns an array of issues.

Search issues in a project

$issues = $client->api('issue')->find('KnpLabs', 'php-github-api', 'closed', 'bug');

Returns an array of closed issues matching the "bug" term. For more complex searches, use the search api which supports the advanced GitHub search syntax.

Get information about an issue

$issue = $client->api('issue')->show('KnpLabs', 'php-github-api', 1);

Returns an array of information about the issue.

Open a new issue

Requires authentication.

$client->api('issue')->create('KnpLabs', 'php-github-api-example', array('title' => 'The issue title', 'body' => 'The issue body'));

Creates a new issue in the repo "php-github-api-example" (the repository in this example does not exist) of the user "KnpLabs". The issue is assigned to the authenticated user. Returns an array of information about the issue.

Close an issue

Requires authentication.

$client->api('issue')->update('KnpLabs', 'php-github-api', 4, array('state' => 'closed'));

Closes the fourth issue of the repo "php-github-api" of the user "KnpLabs". Returns an array of information about the issue.

Reopen an issue

Requires authentication.

$client->api('issue')->update('KnpLabs', 'php-github-api', 4, array('state' => 'open'));

Reopens the fourth issue of the repo "php-github-api" of the user "KnpLabs". Returns an array of information about the issue.

Update an issue

Requires authentication.

$client->api('issue')->update('KnpLabs', 'php-github-api', 4, array('body' => 'The new issue body'));

Updates the fourth issue of the repo "php-github-api" of the user "KnpLabs". Available attributes are title and body. Returns an array of information about the issue.

Search issues matching a label

$client->api('issue')->all('KnpLabs', 'php-github-api', array('labels' => 'label name'));

Returns an array of issues matching the given label.

Lock an issue discussion

$client->api('issue')->lock('KnpLabs', 'php-github-api', 4);

Unlock an issue discussion

$client->api('issue')->unlock('KnpLabs', 'php-github-api', 4);
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
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
uri-template/tests