🚀 [Feature]: Get-GitHubRepository now returns custom properties inline#555
Merged
Marius Storhaug (MariusStorhaug) merged 12 commits intomainfrom Feb 22, 2026
Merged
Conversation
Copilot started work on behalf of
Marius Storhaug (MariusStorhaug)
February 19, 2026 07:42
View session
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update Get-GitHubRepository to use repositoryCustomPropertyValues
🚀 [Feature]: Use repositoryCustomPropertyValues GraphQL field to populate CustomProperties on GitHubRepository
Feb 19, 2026
Marius Storhaug (MariusStorhaug)
requested changes
Feb 19, 2026
Copilot started work on behalf of
Marius Storhaug (MariusStorhaug)
February 19, 2026 08:04
View session
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Marius Storhaug (MariusStorhaug)
approved these changes
Feb 19, 2026
Copilot started reviewing on behalf of
Marius Storhaug (MariusStorhaug)
February 19, 2026 08:07
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the GitHubRepository class to populate CustomProperties directly from GitHub's GraphQL API using the newly available repositoryCustomPropertyValues field, eliminating the need for separate REST API calls to retrieve custom properties.
Changes:
- Added GraphQL query fragment for
repositoryCustomPropertyValuesto fetch up to 100 custom properties - Implemented transformation logic in both REST and GraphQL constructors to normalize custom property format to PascalCase (
Name/Value) - Maintained consistency between REST (
property_name/value) and GraphQL (propertyName/value) API response formats
…ial success scenarios
… to improve clarity
…phQL queries to prevent errors
Marius Storhaug (MariusStorhaug)
requested changes
Feb 20, 2026
Copilot started work on behalf of
Marius Storhaug (MariusStorhaug)
February 20, 2026 08:14
View session
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
a489f06
into
main
345 of 352 checks passed
Contributor
|
✅ New release: PowerShell Gallery - GitHub 0.41.0 |
Contributor
|
✅ New release: GitHub - GitHub v0.41.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Get-GitHubRepositorynow 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.repositoryCustomPropertyValuesGraphQL field to populate CustomProperties on GitHubRepository #554New: Custom properties on
Get-GitHubRepositoryresultsGet-GitHubRepositorynow returns custom properties inline when retrieving a repository by name. Previously, retrieving custom properties required a separate call toGet-GitHubRepositoryCustomProperty.A new strongly-typed
GitHubCustomPropertyclass providesNameandValueproperties with consistent casing regardless of whether the data comes from the REST or GraphQL API.Get-GitHubRepositoryCustomPropertyremains 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
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.Get-GitHubRepositoryByName,Get-GitHubMyRepositoryByName,Get-GitHubEnterpriseByName,Get-GitHubReleaseAssetByTag, andGet-GitHubReleaseAssetFromLatest..github/,examples/,src/classes/,src/functions/, andtests/.