mirror of
https://github.com/actions/versions-package-tools.git
synced 2025-12-10 11:41:23 +00:00
Merge helpers function from node, boost, python. (#2)
* setup boost helpers * add ci for pull requests * pester for ci * resolving issue with pester 5 * remove Output flag * check tests with 4 version * try common tests variant * added requires * move to 5 version * try to add assert module * fix scope * use new regex for python * fix regex in tests * Pester 4.10.1 * EnableExit * fix synopsys * fix creating tar archive Co-authored-by: Dmitry Shibanov <v-dmshib@microsoft.com> Co-authored-by: Maxim Lobanov <v-malob@microsoft.com>
This commit is contained in:
@@ -60,9 +60,26 @@ class GitHubApi
|
||||
return $this.InvokeRestMethod($url, 'Post', $null, $requestBody)
|
||||
}
|
||||
|
||||
[object] GetGitHubReleases(){
|
||||
[array] GetReleases(){
|
||||
$url = "releases"
|
||||
return $this.InvokeRestMethod($url, 'GET', $null, $null)
|
||||
$releases = @()
|
||||
$pageNumber = 1
|
||||
$releaseNumberLimit = 10000
|
||||
|
||||
while ($releases.Count -le $releaseNumberLimit)
|
||||
{
|
||||
$requestParams = "page=${pageNumber}&per_page=100"
|
||||
[array] $response = $this.InvokeRestMethod($url, 'GET', $requestParams, $null)
|
||||
|
||||
if ($response.Count -eq 0) {
|
||||
break
|
||||
} else {
|
||||
$releases += $response
|
||||
$pageNumber++
|
||||
}
|
||||
}
|
||||
|
||||
return $releases
|
||||
}
|
||||
|
||||
[string] hidden BuildUrl([string]$Url, [string]$RequestParams) {
|
||||
|
||||
Reference in New Issue
Block a user