Repository navigation
Merging a pull request (Not found in the docs) #866
Copy link
Copy link
Open
Labels
Description
Activity
The docs entry is indeed missing, but the api code covers this method
php-github-api/lib/Github/Api/PullRequest.php
Lines 181 to 202 in 5eb55ce
public function merge($username, $repository, $id, $message, $sha, $mergeMethod = 'merge', $title = null) { if (is_bool($mergeMethod)) { $mergeMethod = $mergeMethod ? 'squash' : 'merge'; } if (!in_array($mergeMethod, ['merge', 'squash', 'rebase'], true)) { throw new InvalidArgumentException(sprintf('"$mergeMethod" must be one of ["merge", "squash", "rebase"] ("%s" given).', $mergeMethod)); } $params = [ 'commit_message' => $message, 'sha' => $sha, 'merge_method' => $mergeMethod, ]; if (is_string($title)) { $params['commit_title'] = $title; } return $this->put('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.rawurlencode($id).'/merge', $params); } If you can open a pr and add a docs entry for it would be appreciated. Thanks!
- addedgood first issueIdeal for your first contribution!Ideal for your first contribution!
on Apr 24, 2020 - added a commit that references this issue
on Apr 24, 2023
I see that merging a pull request is possible but I couldn't find it in the docs in this repo. Is the document not updated or the feature itself is not available?
https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-button