The Plan job (Resolve-Version / scripts/main.ps1) fails on some consumer repos after they adopt v6.1.4, at the "Get releases - GitHub" step:
main.ps1: Cannot bind argument to parameter 'Releases' because it is null.
Because every downstream job needs: Plan, the whole run fails.
Reproduction
Observed on consumer PRs that bump the reusable-workflow pin to v6.1.4:
PSModule/CurseForge#37 — the repo has 0 releases.
PSModule/Path#39 — the repo has 5 releases, yet the "Get releases - GitHub" step still produced $null.
Both fail consistently, including on isolated re-runs (so it is not load/rate-limit flakiness).
Likely cause
The release-resolution path passes the result of the GitHub releases lookup to a -Releases parameter that does not accept $null. When the lookup yields $null (a repo with no releases, or an empty/failed response), the parameter binding throws before the version can be resolved.
Suggested fix
Default the releases collection to an empty array before binding (e.g. coalesce to @()), so the "no releases" case resolves to the current/initial version instead of throwing. Also confirm the "Get releases" query returns an array even when a repo has zero releases.
Impact
Blocks adoption of v6.1.4 for any consumer whose release lookup returns $null (at minimum, release-less repos). Surfaced while upgrading the full set of Process-PSModule consumers to v6.1.4.
The
Planjob (Resolve-Version /scripts/main.ps1) fails on some consumer repos after they adopt v6.1.4, at the "Get releases - GitHub" step:Because every downstream job
needs: Plan, the whole run fails.Reproduction
Observed on consumer PRs that bump the reusable-workflow pin to v6.1.4:
PSModule/CurseForge#37— the repo has 0 releases.PSModule/Path#39— the repo has 5 releases, yet the "Get releases - GitHub" step still produced$null.Both fail consistently, including on isolated re-runs (so it is not load/rate-limit flakiness).
Likely cause
The release-resolution path passes the result of the GitHub releases lookup to a
-Releasesparameter that does not accept$null. When the lookup yields$null(a repo with no releases, or an empty/failed response), the parameter binding throws before the version can be resolved.Suggested fix
Default the releases collection to an empty array before binding (e.g. coalesce to
@()), so the "no releases" case resolves to the current/initial version instead of throwing. Also confirm the "Get releases" query returns an array even when a repo has zero releases.Impact
Blocks adoption of v6.1.4 for any consumer whose release lookup returns
$null(at minimum, release-less repos). Surfaced while upgrading the full set of Process-PSModule consumers to v6.1.4.