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

Organization / Variables API

Back to the "Organization API" | Back to the navigation

List organization variables

https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#list-organization-variables

$variables = $client->organization()->variables()->all('KnpLabs');

Get an organization variable

https://docs.github.com/en/rest/reference/actions#get-an-organization-secret

$variable = $client->organization()->variables()->show('KnpLabs', $variableName);

Create an organization variable

https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#create-an-organization-variable

$client->organization()->variables()->create('KnpLabs', [
    'name' => $name,
    'value' => $value,
    'visibility' => $visibility,
    'selected_repository_ids' => $selectedRepositoryIds,
]);

Update an organization variable

https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#update-an-organization-variable

$client->organization()->variables()->update('KnpLabs', $variableName, [
    'name' => $name,
    'value' => $value,
    'visibility' => $visibility,
    'selected_repository_ids' => $selectedRepositoryIds
]);

Delete an organization variable

https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#delete-an-organization-variable

$client->organization()->variables()->remove('KnpLabs', $variableName);

List selected repositories for organization variable

https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#list-selected-repositories-for-an-organization-variable

$client->organization()->variables()->selectedRepositories('KnpLabs', $variableName);

Set selected repositories for an organization variable

https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#set-selected-repositories-for-an-organization-variable

$client->organization()->variables()->setSelectedRepositories('KnpLabs', 'variableName', [
    'selected_repository_ids' => [1, 2, 3],
]);

Add selected repository to an organization variable

https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#add-selected-repository-to-an-organization-variable

$client->organization()->variables()->addRepository('KnpLabs', $repositoryId, $variableName);

Remove selected repository from an organization variable

https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#remove-selected-repository-from-an-organization-variable

$client->organization()->variables()->removeRepository('KnpLabs', $repositoryId, $variableName);
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