Skip to content

Commit 2856710

Browse files
committed
Add $this->encodeReference() call Inside matching()
- reference parameters for the API can contain a '/', luckily we already have a method to handle these cases
1 parent 61fe18b commit 2856710

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Github/Api/GitData/References.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ public function all($username, $repository)
3636
*/
3737
public function matching(string $username, string $repository, string $reference): array
3838
{
39-
return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/matching-refs/'.rawurlencode($reference));
39+
$reference = $this->encodeReference($reference);
40+
41+
return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/matching-refs/'.$reference);
4042
}
4143

4244
/**

0 commit comments

Comments
 (0)