Skip to content

Add GitHub API versioning header #377

@variableresistor

Description

@variableresistor

Feature Idea Summary

Add versioning to API request header.

Feature Idea Additional Details

GitHub has announced that they will start versioing their API. It's best to add the version to the API header. Using the 'X-GitHub-Api-Version' header and setting the value to the first version of their API '2022-11-28'.

https://github.blog/2022-11-28-to-infinity-and-beyond-enabling-the-future-of-githubs-rest-api-with-api-versioning/

Requested Assignment

If possible, I would like to implement this.

    $headers = @{
        'Accept' = $AcceptHeader
        'User-Agent' = 'PowerShellForGitHub'
        'X-GitHub-Api-Version'='2022-11-28'
    }

Operating System

OsName : Microsoft Windows 10 Enterprise
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture : 64-bit
WindowsVersion : 2009
WindowsBuildLabEx : 19041.1.amd64fre.vb_release.191206-1406
OsLanguage : en-US
OsMuiLanguages : {en-US}

PowerShell Version

PSVersion 7.2.6
PSEdition Core
GitCommitId 7.2.6
OS Microsoft Windows 10.0.19044
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Module Version

Running: 0.16.1
Installed: 0.16.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAn issue or pull request introducing new functionality to the project.triage neededAn issue that needs to be reviewed by a member of the team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions