Open pauby opened 1 year ago
Thanks for the report.
I just drafted up a fix that I've locally verified works, but I need to update some tests as well.
Get-GitHubReleaseAsset
combines three different API's into a single command: returning the full list of assets, returning a single asset and downloading an asset. In order to support downloading, it uses the single-call API (Invoke-GHRestMethod
):
However, for the "full list of assets" scenario, it really needs to be using Invoke-GHRestMethodMultipleResult
which will automatically take care of paging.
Draft change is here: https://github.com/microsoft/PowerShellForGitHub/compare/master...HowardWolosky:PowerShellForGitHub:releaseAssetPaging
Awesome. Thanks for picking that up and troubleshooting it so quickly.
Can we get a PR on this one? It's been a while and appears to have a fix: https://github.com/microsoft/PowerShellForGitHub/compare/master...HowardWolosky:PowerShellForGitHub:releaseAssetPaging
@Xander-Rudolph are you asking for me to submit a PR?
@Xander-Rudolph are you asking for me to submit a PR?
Anyone who can 😁. I had to do a really janky workaround because I'm using this PowerShell module on ephemeral images.
👍 I worked around it by creating my own function that does the work I need. It's not as complete as this as I don't need all the functionality so nothing I can PR in.
@HowardWolosky Could you please create a pull request for your draft? I'd really like to have this fix released so that my CI works correctly
Issue Details
Using
Get-GitHubReleaseAsset
on a release with more than 30 assets, only returns the first 30. Note that I'm using a GitHub token. I have tried this on Windows PowerShell 5.1 and PowerShell 7.2.6 on Windows.Steps to reproduce the issue
Verbose logs showing the problem
Suggested solution to the issue
Is paging at play here? If so, how do I get the second page? No suggested solution.
Requested Assignment
I'm just reporting this problem, but don't want to fix it.
Operating System
PowerShell Version
Module Version