v0.41.0
π [Feature]: Get-GitHubRepository now returns custom properties inline (#555)
Get-GitHubRepository now includes custom properties directly on the returned object β no separate API call needed. GraphQL queries that encounter unavailable fields now return partial results with warnings instead of failing, and commands that target non-existent resources return nothing instead of throwing errors. Various spelling corrections across source files, documentation, and tests are also included.
New: Custom properties on Get-GitHubRepository results
Get-GitHubRepository now returns custom properties inline when retrieving a repository by name. Previously, retrieving custom properties required a separate call to Get-GitHubRepositoryCustomProperty.
$repo = Get-GitHubRepository -Owner 'PSModule' -Name 'GitHub'
$repo.CustomProperties | Format-Table
# Name Value
# ---- -----
# Type Module
# Status ActiveA new strongly-typed GitHubCustomProperty class provides Name and Value properties with consistent casing regardless of whether the data comes from the REST or GraphQL API.
Note: Custom properties are populated when using
Get-GitHubRepositoryto fetch a specific repository. Other commands that return repository objects (e.g., listing repositories) may not include custom properties depending on the underlying API response.
Get-GitHubRepositoryCustomProperty remains available if you only need custom properties without the full repository object.
Fixed: Queries no longer fail when some fields are unavailable
GraphQL queries that encounter fields unavailable for some repositories (such as custom properties on repos where permissions are limited) now return the available data and emit warnings for the errors. Previously, any GraphQL error β even with valid data β caused a terminating error.
Fixed: Commands no longer throw when a resource doesn't exist
Commands that query a specific repository, enterprise, or release by name now return nothing instead of throwing an error when the resource doesn't exist. This makes it safe to use these commands in conditional logic without wrapping them in try/catch.
Technical Details
- New
GitHubCustomPropertyclass insrc/classes/public/Repositories/GitHubCustomProperty.ps1with constructors accepting both REST (property_name) and GraphQL (propertyName) field names. GitHubRepositoryclass:CustomPropertiesproperty changed from[PSCustomObject]to[GitHubCustomProperty[]].PropertyToGraphQLMapentry now maps torepositoryCustomPropertyValues(first: 100) { nodes { propertyName value } }.CustomPropertiesremoved from the GraphQL field exclusion list inGet-GitHubRepositoryByNameandGet-GitHubMyRepositoryByNameonly β these are the private functions behindGet-GitHubRepository.Invoke-GitHubGraphQLQuery: Error handling split into partial-success (data + errors β warnings) and full-failure (errors only β terminating error) branches.- Null guards added to
Get-GitHubRepositoryByName,Get-GitHubMyRepositoryByName,Get-GitHubEnterpriseByName,Get-GitHubReleaseAssetByTag, andGet-GitHubReleaseAssetFromLatest. - Spelling corrections across 18 files in
.github/,examples/,src/classes/,src/functions/, andtests/.