* Modify repo page data.

This commit is contained in:
caoyanyi
2022-07-12 15:37:16 +08:00
parent ed24e40025
commit 75bf140f6d
6 changed files with 102 additions and 100 deletions
+17
View File
@@ -834,4 +834,21 @@ class gitlab
return $parsedLogs;
}
/**
* Get download url.
*
* @param string $branch
* @param string $ext
* @access public
* @return string
*/
public function getDownloadUrl($branch = 'master', $ext = 'zip')
{
$params = (array) $params;
$params['private_token'] = $this->token;
$params['sha'] = $branch;
return "{$this->root}archive.{$ext}" . '?' . http_build_query($params);
}
}