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)
257257 * @param string $username the user who owns the repository
258258 * @param string $repository the name of the repository
259259 * @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
260261 *
261262 * @return string|array the readme content
262263 */
263- public function readme ($ username , $ repository , $ format = 'raw ' )
264+ public function readme ($ username , $ repository , $ format = 'raw ' , $ params = [] )
264265 {
265- return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/readme ' , [] , [
266+ return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/readme ' , $ params , [
266267 'Accept ' => "application/vnd.github. $ format " ,
267268 ]);
268269 }
You can’t perform that action at this time.
0 commit comments