As per May 27th of 2016 Github announced that it's possible to assign multiple assignees via their API.
This PR implements that.
Why
I use this library in PRBot and now had to resort to a custom API call via $client->request() in order to make use of the new API and assign multiple assignees.
How to test
Create GitHub client, and edit an issue on a repo likes so:
but in this case a warning will be shown of level E_USER_DEPRECATED:
$ php test.php
PHP Deprecated: Supplying a string is deprecated, please supply an array of strings. in /projects/github-php-client/client/services/GitHubIssues.php on line 219
Some other things
I changed GitHubIssues::editAnIssue() so that $title is no longer mandatory. To prevent backwards compatibility breakage I did not change the order of the arguments, but this sadly means that you now have to supply null as an argument twice.
This could be improved by moving the mandatory arguments to the left and the arguments that may be omited to the right, but would require releasing a new major version.
What has been done
As per May 27th of 2016 Github announced that it's possible to assign multiple assignees via their API.
This PR implements that.
Why
I use this library in PRBot and now had to resort to a custom API call via
$client->request()
in order to make use of the new API and assign multiple assignees.How to test
Create GitHub client, and edit an issue on a repo likes so:
This works, and for backwards compatibility reasons supplying a string also works:
but in this case a warning will be shown of level E_USER_DEPRECATED:
Some other things
I changed GitHubIssues::editAnIssue() so that $title is no longer mandatory. To prevent backwards compatibility breakage I did not change the order of the arguments, but this sadly means that you now have to supply
null
as an argument twice.This could be improved by moving the mandatory arguments to the left and the arguments that may be omited to the right, but would require releasing a new major version.
Questions and remarks
Just contact me, you know where to find me (-: