Repository navigation
Closed
Labels
Description
php-github-api/lib/Github/Api/PullRequest.php
Lines 148 to 165 in 325b315
| public function create($username, $repository, array $params) | |
| { | |
| // Two ways to create PR, using issue or title | |
| if (!isset($params['issue']) && !isset($params['title'])) { | |
| throw new MissingArgumentException(['issue', 'title']); | |
| } | |
| if (!isset($params['base'], $params['head'])) { | |
| throw new MissingArgumentException(['base', 'head']); | |
| } | |
| // If `issue` is not sent, then `body` must be sent | |
| if (!isset($params['issue']) && !isset($params['body'])) { | |
| throw new MissingArgumentException(['issue', 'body']); | |
| } | |
| return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls', $params); | |
| } |
We should check the $params array if an option draft exists and is set to true. If so we should set the preview accept-header application/vnd.github.shadow-cat-preview+json
See: https://developer.github.com/changes/2019-02-14-draft-pull-requests/
Activity
Add support for draft PRs KnpLabs#807
Add support for draft PRs KnpLabs#807
Add support for draft PRs (#820)