File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -257,12 +257,13 @@ public function remove($username, $repository)
257
257
* @param string $username the user who owns the repository
258
258
* @param string $repository the name of the repository
259
259
* @param string $format one of formats: "raw", "html", or "v3+json"
260
+ * @param array $params additional query params like "ref" to fetch readme for branch/tag
260
261
*
261
262
* @return string|array the readme content
262
263
*/
263
- public function readme ($ username , $ repository , $ format = 'raw ' )
264
+ public function readme ($ username , $ repository , $ format = 'raw ' , $ params = [] )
264
265
{
265
- return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/readme ' , [] , [
266
+ return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/readme ' , $ params , [
266
267
'Accept ' => "application/vnd.github. $ format " ,
267
268
]);
268
269
}
You can’t perform that action at this time.
0 commit comments