Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 1.09 KB

policies.md

File metadata and controls

38 lines (27 loc) · 1.09 KB

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