Summary
\Invoke-GitHubAPI\ currently uses -ApiEndpoint\ as the parameter name for the API path. Scripts in both PSModule/Distributor and MSXOrg/Custo use -Endpoint\ which is not a valid prefix abbreviation of -ApiEndpoint\ in PowerShell.
This causes a runtime error: A parameter cannot be found that matches parameter name 'Endpoint'.
Proposed fix
Add [Alias('Endpoint')]\ to the -ApiEndpoint\ parameter declaration:
\\powershell
[Parameter(Mandatory, ParameterSetName = 'ApiEndpoint')]
[Alias('Endpoint')]
[string] ,
\\
This is a non-breaking, purely additive change that restores backward compatibility for any scripts written against the older API surface.
Impact
- PSModule/Distributor \scripts/Sync-Files.ps1\ uses -Endpoint\ (broken with current module)
- MSXOrg/Custo \scripts/Sync-Files.ps1\ has been updated to use -ApiEndpoint\ as a workaround, but upstream Distributor still needs this fix
Summary
\Invoke-GitHubAPI\ currently uses -ApiEndpoint\ as the parameter name for the API path. Scripts in both PSModule/Distributor and MSXOrg/Custo use -Endpoint\ which is not a valid prefix abbreviation of -ApiEndpoint\ in PowerShell.
This causes a runtime error: A parameter cannot be found that matches parameter name 'Endpoint'.
Proposed fix
Add [Alias('Endpoint')]\ to the -ApiEndpoint\ parameter declaration:
\\powershell
[Parameter(Mandatory, ParameterSetName = 'ApiEndpoint')]
[Alias('Endpoint')]
[string] ,
\\
This is a non-breaking, purely additive change that restores backward compatibility for any scripts written against the older API surface.
Impact