Back to the "Repos API" | Back to the navigation
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#list-repository-variables
$variables = $client->api('repo')->variables()->all('KnpLabs', 'php-github-api');
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#get-a-repository-variable
$variable = $client->api('repo')->variables()->show('KnpLabs', 'php-github-api', $variableName);
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#create-a-repository-variable
$client->api('repo')->variables()->create('KnpLabs', 'php-github-api', [
'name' => $name,
'value' => $value,
]);
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#update-a-repository-variable
$client->api('repo')->variables()->update('KnpLabs', 'php-github-api', $variableName, [
'name' => $name,
'value' => $value,
]);
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#delete-a-repository-variable
$client->api('repo')->variables()->remove('KnpLabs', 'php-github-api', $variableName);