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
72 stars 28 forks source link

Error querying github_workflow for repository that contains dynamic workflows #410

Closed joverlee521 closed 5 months ago

joverlee521 commented 5 months ago

Describe the bug When querying the github_workflow table for a repository that contains dynamic workflows, I see this error

ERROR:  rpc error: code = Unknown desc = github: table 'github_workflow' column 'pipeline' requires hydrate data from GitHubWorkflowFileContent, which failed with error GET https://api.github.com/repos/nextstrain/hbv/contents/dynamic/pages/pages-build-deployment?ref=workflows: 404 No commit found for the ref workflows [].

These dynamic workflows with path dynamic/pages/* are automatically generated by GitHub when deploying GitHub pages with a defined publishing source.

Steampipe version (steampipe -v) Steampipe v0.22.1

Plugin version (steampipe plugin list) 0.39.1

To reproduce

select *
    from                                          
        github_workflow
    where              
        repository_full_name = 'nextstrain/hbv';

Expected behavior No error.

Additional context See additional details in https://github.com/nextstrain/status/issues/6. We've worked around this issue with https://github.com/nextstrain/status/pull/7