Skip to content

scripts/Sync-Files.ps1 uses -Endpoint which is not a valid parameter of Invoke-GitHubAPI #15

Description

Bug

\scripts/Sync-Files.ps1\ calls \Invoke-GitHubAPI\ with -Endpoint:

\\powershell
Invoke-GitHubAPI -Method GET -Endpoint "/repos/.../pulls" ...
\\

The current PSModule/GitHub module has this parameter named -ApiEndpoint, not -Endpoint. PowerShell cannot resolve -Endpoint\ as a prefix abbreviation of -ApiEndpoint, so this throws at runtime:

A parameter cannot be found that matches parameter name 'Endpoint'

Fix options

  1. Update this script to use -ApiEndpoint\ (immediate fix)
  2. Wait for PSModule/GitHub #653 which adds -Endpoint\ as an alias (restores backward compat)

Affected lines

Three calls in \scripts/Sync-Files.ps1\ — the PR list GET, the PR create POST, and the label POST.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions