policies.md
March 10, 2023 ยท View on GitHub
Deployment / Branch policies API
Back to the "Deployment API" | Back to the navigation
Provides information about deployment branch policies. Wraps GitHub Deployment branch policies API.
List deployment branch policies.
$policies = $client->deployment()->policies()->all('KnpLabs', 'php-github-api', 'production');
Get one environment.
$policy = $client->deployment()->policies()->show('KnpLabs', 'php-github-api', 'production', $branchPolicyId);
Create policy.
$data = $client->deployment()->policies()->create('KnpLabs', 'php-github-api', 'production', [
'name' => 'name'
]);
Update policy.
$data = $client->deployment()->policies()->update('KnpLabs', 'php-github-api', 'production', $branchPolicyId, [
'name' => 'name'
]);
Delete a existing policy.
$policy = $client->deployment()->policies()->remove('KnpLabs', 'php-github-api', 'production', $branchPolicyId);