steampipe-plugin-github icon indicating copy to clipboard operation
steampipe-plugin-github copied to clipboard

Expose repository custom properties.

Open christophla opened this issue 5 months ago • 0 comments

Is your feature request related to a problem? Please describe.

Repository custom properties are not currently included in the github_repository table. These would be very useful for displaying additional metadata within Steampipe/Powerpipe dashboards.

From the Github API Schema (2022-11-18)

"custom_properties": {
  "type": "object",
  "description": "The custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values.",
  "additionalProperties": true
 }

Describe the solution you'd like

I would like to be able to query against the custom properties for a repository. I'm not sure what the syntax would be, but it could be based off of the current json approach. (https://steampipe.io/docs/sql/querying-json)

SELECT * FROM github_repository WHERE custom_properties ->> 'project' = 'my-project'
SELECT custom_properties["project"] FROM github_repository WHERE repository_full_name = 'my-repo'

If this isn't feasible, adding a github_repository_properties table may be beneficial.

SELECT project, data_class, component FROM github_repository_properties WHERE repository_full_name = 'my-repo'

Describe alternatives you've considered I have not been able to query for custom properties within the steampipe environment.

Additional context None

christophla avatar Sep 13 '24 04:09 christophla