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).
Back to the "Organization API" | Back to the navigation
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#list-organization-variables
$variables = $client->organization()->variables()->all('KnpLabs');
https://docs.github.com/en/rest/reference/actions#get-an-organization-secret
$variable = $client->organization()->variables()->show('KnpLabs', $variableName);
$client->organization()->variables()->create('KnpLabs', [
'name' => $name,
'value' => $value,
'visibility' => $visibility,
'selected_repository_ids' => $selectedRepositoryIds,
]);
$client->organization()->variables()->update('KnpLabs', $variableName, [
'name' => $name,
'value' => $value,
'visibility' => $visibility,
'selected_repository_ids' => $selectedRepositoryIds
]);
$client->organization()->variables()->remove('KnpLabs', $variableName);
$client->organization()->variables()->selectedRepositories('KnpLabs', $variableName);
$client->organization()->variables()->setSelectedRepositories('KnpLabs', 'variableName', [
'selected_repository_ids' => [1, 2, 3],
]);
$client->organization()->variables()->addRepository('KnpLabs', $repositoryId, $variableName);
$client->organization()->variables()->removeRepository('KnpLabs', $repositoryId, $variableName);
How can I help you explore Laravel packages today?