1
0
Fork 0

Changes the query string parameter `sha` to `ref` to reflect the GitLab API

Updated the unit test to reflect the change
Fixes #6198
pull/6093/merge
Sjoerd Adema 2017-02-23 23:08:50 +01:00 committed by Jordi Boggiano
parent f200343cf2
commit 8a496cd2a7
2 changed files with 2 additions and 2 deletions

View File

@ -175,7 +175,7 @@ class GitLabDriver extends VcsDriver
*/ */
public function getDist($identifier) public function getDist($identifier)
{ {
$url = $this->getApiUrl().'/repository/archive.zip?sha='.$identifier; $url = $this->getApiUrl().'/repository/archive.zip?ref='.$identifier;
return array('type' => 'zip', 'url' => $url, 'reference' => $identifier, 'shasum' => ''); return array('type' => 'zip', 'url' => $url, 'reference' => $identifier, 'shasum' => '');
} }

View File

@ -144,7 +144,7 @@ JSON;
$reference = 'c3ebdbf9cceddb82cd2089aaef8c7b992e536363'; $reference = 'c3ebdbf9cceddb82cd2089aaef8c7b992e536363';
$expected = array( $expected = array(
'type' => 'zip', 'type' => 'zip',
'url' => 'https://gitlab.com/api/v3/projects/mygroup%2Fmyproject/repository/archive.zip?sha='.$reference, 'url' => 'https://gitlab.com/api/v3/projects/mygroup%2Fmyproject/repository/archive.zip?ref='.$reference,
'reference' => $reference, 'reference' => $reference,
'shasum' => '', 'shasum' => '',
); );