Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add table github_package and github_package_version #459

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Oct 24, 2024

Example query results

Results
> select *  from github_package_version where organization = 'turbot' and package_name = 'steampipe/plugins/turbot/aws'
+----------------------+------------------------------+-----------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+---------------------------+--->
| login_id             | package_name                 | id        | digest                                                                  | html_url                                                                                       | tags                      | or>
+----------------------+------------------------------+-----------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+---------------------------+--->
| MDQ6VXNlcjQ3ODg3NTUy | steampipe/plugins/turbot/aws | 293319827 | sha256:91c6eeb0570b0229aba7c75628c7ada1015eeb727bef0ff44817a74744f4723a | https://github.com/orgs/turbot/packages/container/steampipe%2Fplugins%2Fturbot%2Faws/293319827 | ["11462847177","1.0.0"]   | tu>
| MDQ6VXNlcjQ3ODg3NTUy | steampipe/plugins/turbot/aws | 237235444 | sha256:69831633b99b174c86a968f2f60863f617a07b0f036d8d6ec12fcec9b35aa731 | https://github.com/orgs/turbot/packages/container/steampipe%2Fplugins%2Fturbot%2Faws/237235444 | ["9738491108","0.141.0"]  | tu>
| MDQ6VXNlcjQ3ODg3NTUy | steampipe/plugins/turbot/aws | 231280932 | sha256:217baa6355679212c7c13ccfb5994cbc6c36c1581a4475e08bedcc7f8576c5e0 | https://github.com/orgs/turbot/packages/container/steampipe%2Fplugins%2Fturbot%2Faws/231280932 | ["9554587442","0.139.0"]  | tu>
| MDQ6VXNlcjQ3ODg3NTUy | steampipe/plugins/turbot/aws | 214094141 | sha256:e37f0f833fc294ea5fce717364201456b38d89f76e505877bc138f19b7f83c25 | https://github.com/orgs/turbot/packages/container/steampipe%2Fplugins%2Fturbot%2Faws/214094141 | ["9016192446","0.138.0"]  | tu>
| MDQ6VXNlcjQ3ODg3NTUy | steampipe/plugins/turbot/aws | 203110114 | sha256:ed529dec9d3b7b36e7f49a5d78fe6953e81af7603dc511a33445d995ea3d9960 | https://github.com/orgs/turbot/packages/container/steampipe%2Fplugins%2Fturbot%2Faws/203110114 | ["8664910709","0.135.0"]  | tu>


> select * from github_package where organization = 'turbot'
+----------------------+---------+---------------------------------------------------------------------------------------------------------------+--------------+--------------+-------------+----------+-------------------------------------+---------------------------+-->
| login_id             | id      | name                                                                                                          | package_type | organization | owner_login | owner_id | owner_url                           | owner_html_url            | r>
+----------------------+---------+---------------------------------------------------------------------------------------------------------------+--------------+--------------+-------------+----------+-------------------------------------+---------------------------+-->
| MDQ6VXNlcjQ3ODg3NTUy | 6331189 | steampipe/plugins/turbot/docker                                                                               | container    | turbot       | turbot      | 38865304 | https://api.github.com/users/turbot | https://github.com/turbot | 3>
|                      |         |                                                                                                               |              |              |             |          |                                     |                           |  >
|                      |         |                                                                                                               |              |              |             |          |                                     |                           |  >
|                      |         |                                                                                                               |              |              |             |          |                                     |                           |  >
|                      |         |                                                                                                               |              |              |             |          |                                     |                           |  >
| MDQ6VXNlcjQ3ODg3NTUy | 1494498 | steampipe-postgres-fdw/run-on-arch-turbot-steampipe-postgres-fdw-build-linux-arm-binary-aarch64-ubuntu-latest | container    | turbot       | turbot      | 38865304 | https://api.github.com/users/turbot | https://github.com/turbot | 3>
|                      |         |                                                                                                               |              |              |             |          |                                     |                           |  >
|                      |         |                                                                                                               |              |              |             |          |                                     |                           |  >
|                      |         |                                                                                                               |              |              |             |          |                                     |                           |  >
|                      |         |                                                                                                               |              |              |             |          |                                     |                           |  >
| MDQ6VXNlcjQ3ODg3NTUy | 6331177 | steampipe/plugins/turbot/digitalocean                                                                         | container    | turbot       | turbot      | 38865304 | https://api.github.com/users/turbot | https://github.com/turbot | 3>

@ParthaI ParthaI requested a review from cbruno10 October 24, 2024 14:24
@ParthaI ParthaI self-assigned this Oct 24, 2024
@cbruno10
Copy link
Contributor

@ParthaI I think there were a few column name changes compared to the API property name changes, can you please list those in this PR? Thanks!

@ParthaI
Copy link
Contributor Author

ParthaI commented Nov 28, 2024

@cbruno10, In this PR for the github_package_version table, I made the following changes intentionally:

  • Added the column package_name instead of name to avoid conflicts with the github_package table, as it serves as the parent of github_package_version.
  • Renamed the name column to digest since the value for the name attribute always contains the digest value (e.g., sha256:91c6eeb0570b0229aba7c75628c7ada1015eeb727bef0ff44817a74744f4723a)

I’d appreciate your thoughts on these changes.

Thanks!

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