-
-
Notifications
You must be signed in to change notification settings - Fork 597
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
1,535 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
## Organization / Variables API | ||
[Back to the "Organization API"](../organization.md) | [Back to the navigation](../README.md) | ||
|
||
### List organization variables | ||
|
||
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#list-organization-variables | ||
|
||
```php | ||
$variables = $client->organization()->variables()->all('KnpLabs'); | ||
``` | ||
|
||
### Get an organization variable | ||
|
||
https://docs.github.com/en/rest/reference/actions#get-an-organization-secret | ||
|
||
```php | ||
$variable = $client->organization()->variables()->show('KnpLabs', $variableName); | ||
``` | ||
|
||
### Create an organization variable | ||
|
||
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#create-an-organization-variable | ||
|
||
```php | ||
$client->organization()->variables()->create('KnpLabs', [ | ||
'name' => $name, | ||
'value' => $value, | ||
'visibility' => $visibility, | ||
'selected_repository_ids' => $selectedRepositoryIds, | ||
]); | ||
``` | ||
|
||
### Update an organization variable | ||
|
||
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#update-an-organization-variable | ||
|
||
```php | ||
$client->organization()->variables()->update('KnpLabs', $variableName, [ | ||
'name' => $name, | ||
'value' => $value, | ||
'visibility' => $visibility, | ||
'selected_repository_ids' => $selectedRepositoryIds | ||
]); | ||
``` | ||
|
||
### Delete an organization variable | ||
|
||
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#delete-an-organization-variable | ||
|
||
```php | ||
$client->organization()->variables()->remove('KnpLabs', $variableName); | ||
``` | ||
|
||
### List selected repositories for organization variable | ||
|
||
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#list-selected-repositories-for-an-organization-variable | ||
|
||
```php | ||
$client->organization()->variables()->selectedRepositories('KnpLabs', $variableName); | ||
``` | ||
|
||
### Set selected repositories for an organization variable | ||
|
||
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#set-selected-repositories-for-an-organization-variable | ||
|
||
```php | ||
$client->organization()->variables()->setSelectedRepositories('KnpLabs', 'variableName', [ | ||
'selected_repository_ids' => [1, 2, 3], | ||
]); | ||
``` | ||
|
||
### Add selected repository to an organization variable | ||
|
||
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#add-selected-repository-to-an-organization-variable | ||
|
||
```php | ||
$client->organization()->variables()->addRepository('KnpLabs', $repositoryId, $variableName); | ||
``` | ||
|
||
### Remove selected repository from an organization variable | ||
|
||
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#remove-selected-repository-from-an-organization-variable | ||
|
||
```php | ||
$client->organization()->variables()->removeRepository('KnpLabs', $repositoryId, $variableName); | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
## Repo / Actions / Variables API | ||
[Back to the "Repos API"](../../repos.md) | [Back to the navigation](../../README.md) | ||
|
||
### List repository variables | ||
|
||
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#list-repository-variables | ||
|
||
```php | ||
$variables = $client->api('repo')->variables()->all('KnpLabs', 'php-github-api'); | ||
``` | ||
|
||
### Get a repository variable | ||
|
||
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#get-a-repository-variable | ||
|
||
```php | ||
$variable = $client->api('repo')->variables()->show('KnpLabs', 'php-github-api', $variableName); | ||
``` | ||
|
||
### Create a repository variable | ||
|
||
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#create-a-repository-variable | ||
|
||
```php | ||
$client->api('repo')->variables()->create('KnpLabs', 'php-github-api', [ | ||
'name' => $name, | ||
'value' => $value, | ||
]); | ||
``` | ||
|
||
### Update a repository variable | ||
|
||
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#update-a-repository-variable | ||
|
||
```php | ||
$client->api('repo')->variables()->update('KnpLabs', 'php-github-api', $variableName, [ | ||
'name' => $name, | ||
'value' => $value, | ||
]); | ||
``` | ||
|
||
### Delete a repository variable | ||
|
||
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#delete-a-repository-variable | ||
|
||
```php | ||
$client->api('repo')->variables()->remove('KnpLabs', 'php-github-api', $variableName); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
## Environment / Secrets API | ||
[Back to the "Environments API"](../environments.md) | [Back to the navigation](../README.md) | ||
|
||
### List environment secrets | ||
|
||
https://docs.github.com/en/rest/actions/secrets?apiVersion=2022-11-28 | ||
|
||
```php | ||
$secrets = $client->environment()->secrets()->all($repoId, $envName); | ||
``` | ||
|
||
### Get an environment secret | ||
|
||
https://docs.github.com/en/rest/actions/secrets?apiVersion=2022-11-28#get-an-environment-secret | ||
|
||
```php | ||
$secret = $client->environment()->secrets()->show($repoId, $envName, $secretName); | ||
``` | ||
|
||
### Create or Update an environment secret | ||
|
||
https://docs.github.com/en/rest/actions/secrets?apiVersion=2022-11-28#create-or-update-an-environment-secret | ||
|
||
```php | ||
$client->environment()->secrets()->createOrUpdate($repoId, $envName, $secretName, [ | ||
'encrypted_value' => $encryptedValue, | ||
'key_id' => $key_id | ||
]); | ||
``` | ||
|
||
### Delete an environment secret | ||
|
||
https://docs.github.com/en/rest/reference/actions#delete-an-organization-secret | ||
|
||
```php | ||
$client->environment()->secrets()->remove($repoId, $envName, $secretName); | ||
``` | ||
|
||
### Get an environment public key | ||
|
||
https://docs.github.com/en/rest/reference/actions#get-an-organization-public-key | ||
|
||
```php | ||
$client->environment()->secrets()->publicKey($repoId, $envName); | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
## Environment / Variables API | ||
[Back to the "Environments API"](../environments.md) | [Back to the navigation](../README.md) | ||
|
||
### List environment variables | ||
|
||
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#list-environment-variables | ||
|
||
```php | ||
$variables = $client->environment()->variables()->all($repoId, $envName); | ||
``` | ||
|
||
### Get an environment variable | ||
|
||
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#get-an-environment-variable | ||
|
||
```php | ||
$variable = $client->environment()->variables()->show($repoId, $envName, $variableName); | ||
``` | ||
|
||
### Create environment variable | ||
|
||
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#create-an-environment-variable | ||
|
||
```php | ||
$client->environment()->variables()->create($repoId, $envName, [ | ||
'name' => $name, | ||
'value' => $value | ||
]); | ||
``` | ||
|
||
### Update environment variable | ||
|
||
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#update-an-environment-variable | ||
|
||
```php | ||
$client->environment()->variables()->update($repoId, $envName, $variableName, [ | ||
'name' => $name, | ||
'value' => $value | ||
]); | ||
``` | ||
|
||
### Delete an environment variable | ||
|
||
https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#delete-an-environment-variable | ||
|
||
```php | ||
$client->environment()->variables()->remove($repoId, $envName, $variableName); | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
## Deployment / Environments API | ||
[Back to the "Deployment API"](../deployments.md) | [Back to the navigation](../index.md) | ||
|
||
Provides information about environments for a repository. Wraps [GitHub Environments API](https://docs.github.com/en/rest/deployments/environments?apiVersion=2022-11-28). | ||
|
||
Additional APIs: | ||
* [Secrets API](environment/secrets.md) | ||
* [Variables API](environment/variables.md) | ||
|
||
#### List all environments. | ||
|
||
```php | ||
$environments = $client->deployment()->environment()->all('KnpLabs', 'php-github-api'); | ||
``` | ||
|
||
### Get one environment. | ||
|
||
```php | ||
$environment = $client->deployment()->environment()->show('KnpLabs', 'php-github-api', $name); | ||
``` | ||
|
||
#### Create or update environment. | ||
|
||
```php | ||
$data = $client->deployment()->environment()->createOrUpdate('KnpLabs', 'php-github-api', $name); | ||
``` | ||
|
||
#### Delete a existing environment. | ||
|
||
```php | ||
$environment = $client->deployment()->environment()->remove('KnpLabs', 'php-github-api', $name); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
## Deployment / Branch policies API | ||
[Back to the "Deployment API"](../deployments.md) | [Back to the navigation](../index.md) | ||
|
||
Provides information about deployment branch policies. Wraps [GitHub Deployment branch policies API](https://docs.github.com/en/rest/deployments/branch-policies?apiVersion=2022-11-28#about-deployment-branch-policies). | ||
|
||
#### List deployment branch policies. | ||
|
||
```php | ||
$policies = $client->deployment()->policies()->all('KnpLabs', 'php-github-api', 'production'); | ||
``` | ||
|
||
### Get one environment. | ||
|
||
```php | ||
$policy = $client->deployment()->policies()->show('KnpLabs', 'php-github-api', 'production', $branchPolicyId); | ||
``` | ||
|
||
#### Create policy. | ||
|
||
```php | ||
$data = $client->deployment()->policies()->create('KnpLabs', 'php-github-api', 'production', [ | ||
'name' => 'name' | ||
]); | ||
``` | ||
|
||
#### Update policy. | ||
|
||
```php | ||
$data = $client->deployment()->policies()->update('KnpLabs', 'php-github-api', 'production', $branchPolicyId, [ | ||
'name' => 'name' | ||
]); | ||
``` | ||
|
||
#### Delete a existing policy. | ||
|
||
```php | ||
$policy = $client->deployment()->policies()->remove('KnpLabs', 'php-github-api', 'production', $branchPolicyId); | ||
``` |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.