forked from KnpLabs/php-github-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding API endpoints to interact with custom properties
- Loading branch information
Showing
3 changed files
with
38 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
## Repo / Custom Properties API | ||
[Back to the "Repos API"](../repos.md) | [Back to the navigation](../README.md) | ||
|
||
For extended info see the [GitHub documentation](https://docs.github.com/en/rest/reference/repos#custom-properties-for-a-repository) | ||
|
||
### List custom properties for a repository | ||
|
||
```php | ||
$properties = $client->api('repo')->properties()->all('twbs', 'bootstrap'); | ||
``` | ||
|
||
### Get a custom property for a repository | ||
|
||
```php | ||
$property = $client->api('repo')->properties()->show('twbs', 'bootstrap', $propertyName); | ||
``` | ||
|
||
|
||
### Update a custom property for a repository | ||
|
||
```php | ||
$parameters = [ | ||
'property_name' => 'foo', | ||
'value' => 'bar' | ||
] | ||
|
||
$property = $client->api('repo')->properties()->update('twbs', 'bootstrap', $params); | ||
``` |
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