Skip to content

Get-ALZGithubRelease.ps1 doesn't retrieve all releases from Github #2536

@MarkFarkas

Description

@MarkFarkas

Expected Behavior

The function should be able to donwload any release of ALZ-Bicep

Current Behavior

The function can only find 30 releases. Since this list returned by Github is not consistent, releases are not found randomly. In my case It's unable to donwload the latest release, v0.16.5

Possible Solution

Implement pagination

Steps to Reproduce

Get-ALZGithubRelease -githubRepoUrl 'https://github.com/Azure/ALZ-Bicep' -releases $('v0.16.5')
WARNING: Release v0.16.5 was not found on GitHub Repo: Azure/ALZ-Bicep

Context (Environment)

I was trying to download the latest release of ALZ-Bicep using New-ALZEnvironment

  • Operating System and version as reported by $PSVersionTable.OS: Microsoft Windows 10.0.19045
  • PowerShell versions as reported by $PSVersionTable.PSEdition: Core

Get-ALZGithubRelease.ps1 doesn't retrieve all releases from Github

Detailed Description

The function Get-ALZGithubRelease.ps1 will only retrieve 30 releases from Github, as per https://docs.github.com/en/free-pro-team@latest/rest/releases/releases?apiVersion=2022-11-28#list-releases:~:text=per_page%20integer,Default%3A%2030

Since there are currently 44 releases for the ALZ-Bicep only a portion of them can be found by the function.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions