Skip to content

Add Custom Properties for Repository-Derived Tables - #556

Merged
cbruno10 merged 3 commits into
turbot:mainfrom
Recurzion:Recurzion/gh-custom-props
Jul 16, 2026
Merged

Add Custom Properties for Repository-Derived Tables#556
cbruno10 merged 3 commits into
turbot:mainfrom
Recurzion:Recurzion/gh-custom-props

Conversation

@Recurzion

@Recurzion Recurzion commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

This PR adds the ability to query repository custom properties (returned as jsonb) for any repository-derived columns via sharedRepositoryColumns() and updates docs with example queries (these can be removed if not needed).

Teams often use GitHub custom properties to capture custom repo-level metadata/attributes, so adding this field should benefit organizations that leverage it.

This applies to the following tables:

  • github_repository
  • github_my_repository
  • github_team_repository
  • github_search_repository
  • and any other table using sharedRepositoryColumns()

Example query results

Results

select name,custom_properties  from github_my_repository where name = 'myrepo'

+----------+-------------------------------+
| name | custom_properties                 |
+----------+-------------------------------+
|myrepo |  {"key1":"value1","key2":"value2"}
+----------+-------------------------------+

select name,custom_properties -> 'myproperty' as myproperty from github_repository where  full_name = 'myorg/myrepo'

+----------+-------+
| name | myproperty|
+----------+-------+
|myrepo | "myvalue"|
+----------+-------+



@Recurzion Recurzion changed the title Add Custom Properties as Repository-Derived Tables Add Custom Properties for Repository-Derived Tables Jul 15, 2026

@cbruno10 cbruno10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Recurzion Thanks for the PR!

I've added a couple suggestions, the bigger one is around moving from v3 (REST) to v4 (GraphQL) API, happy to discuss more if you have any questions. Thanks!

Comment thread github/table_github_repository.go Outdated
Value interface{} `json:"value"`
}

func hydrateRepositoryCustomPropertiesFromV3(ctx context.Context, d *plugin.QueryData, h *plugin.HydrateData) (interface{}, error) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using the v3 RESTful API, can we retrieve it using the newer GraphQL API, similar to most other columns in this table? GraphQL APIs in general are more forgiving with rate limits and from what we could see, better supported moving forward.

In the GraphQL API, the Repository object has repositoryCustomPropertyValues, so we can use that I believe and we should get the first: 100, as there seems to be a limit of 100 property definitions.

You can look at the labels column in the github_issue table, as it has the same shape and also does an array to map conversion like this property would use.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing. I followed the same pattern used by the labels column now.

Comment thread github/table_github_repository.go Outdated
Comment thread docs/tables/github_search_repository.md
Comment thread docs/tables/github_team_repository.md
Comment thread docs/tables/github_team_repository.md
@cbruno10
cbruno10 merged commit 5744039 into turbot:main Jul 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants