🚀 [Feature]: Custom properties now included in repository queries by default#561
Open
🚀 [Feature]: Custom properties now included in repository queries by default#561
Conversation
Copilot started work on behalf of
Marius Storhaug (MariusStorhaug)
February 22, 2026 17:28
View session
…ryFork casting Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add CustomProperties to GraphQL output for Get-GitHubRepository
Add CustomProperties to default property lists for all Get-GitHubRepository code paths
Feb 22, 2026
…es and Get-GitHubMyRepositoryByName functions
Copilot started reviewing on behalf of
Marius Storhaug (MariusStorhaug)
February 22, 2026 20:09
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request enhances repository queries to include custom properties by default and standardizes the output format of fork listings. The changes make the CustomProperties field available without requiring explicit parameters for commonly-used repository query paths, and ensure fork listings return strongly-typed [GitHubRepository] objects instead of raw API responses.
Changes:
- Added
CustomPropertiesto the default property list inGet-GitHubRepositoryByNameandGet-GitHubRepositoryListByOwner, enabling custom property data to be included automatically in GraphQL queries for repositories by name and by owner - Updated
Get-GitHubRepositoryForkto cast response objects to[GitHubRepository]type and added[OutputType([GitHubRepository])]attribute, making fork listings consistent with other repository query commands
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/functions/public/Repositories/Repositories/Get-GitHubRepositoryFork.ps1 | Added [OutputType([GitHubRepository])] attribute and changed output from raw $_.Response to foreach ($repo in $_.Response) { [GitHubRepository]::new($repo) } to return strongly-typed repository objects |
| src/functions/private/Repositories/Get-GitHubRepositoryListByOwner.ps1 | Added 'CustomProperties' to the default $Property array, enabling custom properties to be included by default when listing repositories by owner |
| src/functions/private/Repositories/Get-GitHubRepositoryByName.ps1 | Added 'CustomProperties' to the default $Property array (with required trailing comma on previous item), enabling custom properties to be included by default when getting a repository by name |
…ies and Get-GitHubMyRepositoryByName functions
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.
Repository queries by name and by owner now return
CustomPropertiesby default — no additional parameters needed. Fork listings now also return typed[GitHubRepository]objects instead of raw API responses, making them consistent with other repository commands.New: Custom properties included in by-name and by-owner queries
Get-GitHubRepositorynow returnsCustomPropertieswhen querying by name or listing by owner, without needing-AdditionalProperty 'CustomProperties'.Previously, these required an explicit parameter:
Changed: Fork listings return typed repository objects
Get-GitHubRepositoryForknow returns[GitHubRepository]objects instead of rawPSCustomObjectresponses. This means fork listings include all typed properties (includingCustomProperties), consistent with other repository commands.Technical Details
'CustomProperties'to the default$Propertyarray in two private GraphQL functions:Get-GitHubRepositoryByNameandGet-GitHubRepositoryListByOwner. This causes the GraphQL query to include therepositoryCustomPropertyValues(first: 100) { nodes { propertyName value } }sub-query by default.Get-GitHubMyRepositoriesandGet-GitHubMyRepositoryByNamewere initially updated but reverted — these authenticated-user queries do not need the change.Get-GitHubRepositoryForkto cast each response item via[GitHubRepository]::new($repo)and added[OutputType([GitHubRepository])], matching the pattern used byGet-GitHubRepositoryListByTeam.GitHubRepositoryclass — it already supports both REST (custom_properties) and GraphQL (repositoryCustomPropertyValues.nodes) formats in its constructors.