Skip to content

Commit 57722a2

Browse files
committed
Fixed updating a pull request
1 parent 8a8f304 commit 57722a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Github/Api/PullRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ public function create($username, $repository, array $params)
102102
return $this->post('repos/'.urlencode($username).'/'.urlencode($repository).'/pulls', $params);
103103
}
104104

105-
public function update($username, $repository, array $params)
105+
public function update($username, $repository, $id, array $params)
106106
{
107107
if (isset($params['state']) && !in_array($params['state'], array('open', 'closed'))) {
108108
$params['state'] = 'open';
109109
}
110110

111-
return $this->patch('repos/'.urlencode($username).'/'.urlencode($repository).'/pulls', $params);
111+
return $this->patch('repos/'.urlencode($username).'/'.urlencode($repository).'/pulls/'.urlencode($id), $params);
112112
}
113113

114114
public function merged($username, $repository, $id)

0 commit comments

Comments
 (0)