microsoft / PowerShellForGitHub

Microsoft PowerShell wrapper for GitHub API
Other
584 stars 184 forks source link

Read the GitHub Project Tags? #338

Closed schittli closed 2 years ago

schittli commented 2 years ago

Feature Idea Summary

This GitHub Project has assigned those Tags: image

Suggestion

Please allow us to read those tags? (github, api, module, powershell, best-practices, azure-pipelines)

Thanks a lot, kind regards, Thomas

Feature Idea Additional Details

N/A

Requested Assignment

I'm just suggesting this idea, but don't want to implement it.

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, de-DE}

PowerShell Version

5.1.19041.1151

Module Version

Running: Installed: 0.16.0

HowardWolosky commented 2 years ago

Looks like a relatively new REST endpoint that they enabled.

Should be relatively easy to add. In the interim, you can call it this way:

Invoke-GHRestMethod -Method Get -AcceptHeader 'application/vnd.github.mercy-preview+json' -UriFragment '/repos/microsoft/PowerShellForGitHub/topics'

or more clearly:

$ownerName = 'microsoft'
$repositoryName = 'PowerShellForGitHub'

$params  = @{
  Method = 'Get'
  AcceptHeader =  'application/vnd.github.mercy-preview+json'
  UriFragment = "/repos/$ownerName/$repositoryName/topics"}
Invoke-GHRestMethod @params
Tiberriver256 commented 2 years ago

Is this already implemented with the Get-GitHubRepositoryTopic cmdlet?

HowardWolosky commented 2 years ago

Is this already implemented with the Get-GitHubRepositoryTopic cmdlet?

Go figure. You're absolutely right. Looks like we already have this implemented. Good catch @Tiberriver256!

Get-GitHubRespositoryTopic documentation