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);