turbot / steampipe-plugin-github

Use SQL to instantly query repositories, users, gists and more from GitHub. Open source CLI. No DB required.
https://hub.steampipe.io/plugins/turbot/github
Apache License 2.0
74 stars 29 forks source link

Fixed error querying github_workflow for repository that contains dynamic workflows Closes #410 #412

Closed ParthaI closed 6 months ago

ParthaI commented 6 months ago

Example query results

Results ``` Before Fix: > select * from github_workflow where repository_full_name = 'nextstrain/hbv'; Warning: 2 plugins required by 4 connections are missing. To install, please run: steampipe plugin install doppler godaddy Error: github: GET https://api.github.com/repos/nextstrain/hbv/contents/dynamic/pages/pages-build-deployment?ref=workflows: 404 No commit found for the ref workflows [] (SQLSTATE HV000) +----------------------+------+----+------+-----------+------------+----------+---------+-------+------------+-----+-----------------------+----------------------------+----------+------+ | repository_full_name | name | id | path | badge_url | created_at | html_url | node_id | state | updated_at | url | workflow_file_content | workflow_file_content_json | pipeline | _ctx | +----------------------+------+----+------+-----------+------------+----------+---------+-------+------------+-----+-----------------------+----------------------------+----------+------+ +----------------------+------+----+------+-----------+------------+----------+---------+-------+------------+-----+-----------------------+----------------------------+----------+------+ After Fix: > select * from github_workflow where repository_full_name = 'nextstrain/hbv'; Warning: 2 plugins required by 4 connections are missing. To install, please run: steampipe plugin install doppler godaddy +----------------------+------------------------+----------+--------------------------------------+--------------------------------------------------------------------------------------------+---------------------------+---------------> | repository_full_name | name | id | path | badge_url | created_at | html_url > +----------------------+------------------------+----------+--------------------------------------+--------------------------------------------------------------------------------------------+---------------------------+---------------> | nextstrain/hbv | pages-build-deployment | 88698912 | dynamic/pages/pages-build-deployment | https://github.com/nextstrain/hbv/actions/workflows/pages/pages-build-deployment/badge.svg | 2024-03-07T08:11:50+05:30 | https://github> | nextstrain/hbv | Run the builds | 67029840 | .github/workflows/run-builds.yaml | https://github.com/nextstrain/hbv/workflows/Run%20the%20builds/badge.svg | 2023-08-23T05:20:45+05:30 | https://github> | | | | | | | > | | | | | | | > | | | | | | | > | | | | | | | > | | | | | | | > | | | | | | | > | | | | | | | > | | | | | | | > | | | | | | | > | | | | | | | > | | | | | | | > | | | | | | | > | | | | | | | > | | | | | | | > | | | | | | | > | | | | | | | > | | | | | | | > +----------------------+------------------------+----------+--------------------------------------+--------------------------------------------------------------------------------------------+---------------------------+---------------> ```