Skip to content

Commit 51242d8

Browse files
authored
Merge pull request #187 from violuke/patch-1
Allowing different archive format types
2 parents a572f6b + 6a26445 commit 51242d8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Diff for: lib/Gitlab/Api/Repositories.php

+3-5
Original file line numberDiff line numberDiff line change
@@ -337,16 +337,14 @@ public function contributors($project_id)
337337
}
338338

339339
/**
340-
* File content is base64 encoded and placed in the "content" index of the returning array.
341-
* You can then save the content with the tar.gz extension
342-
*
343340
* @param int $project_id
344341
* @param array $params
342+
* @param string $format Options: "tar.gz", "zip", "tar.bz2" and "tar"
345343
* @return mixed
346344
*/
347-
public function archive($project_id, $params = array())
345+
public function archive($project_id, $params = array(), $format = 'tar.gz')
348346
{
349-
return $this->get($this->getProjectPath($project_id, 'repository/archive'), $params);
347+
return $this->get($this->getProjectPath($project_id, 'repository/archive.'.$format), $params);
350348
}
351349

352350
/**

0 commit comments

Comments
 (0)