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

Added support for retrieving specific file content in the github_repository_content table Closes #444 #445

Closed ParthaI closed 1 month ago

ParthaI commented 1 month ago

Example query results

Results ``` > select type, name, path, path_raw,mode, line_count from github_repository_content where repository_full_name = 'turbot/steampipe-plugin-github' and path = 'docs/tables/github_audit_log.md' +------+---------------------+---------------------------------+----------------------------------------------+------+------------+ | type | name | path | path_raw | mode | line_count | +------+---------------------+---------------------------------+----------------------------------------------+------+------------+ | blob | github_audit_log.md | docs/tables/github_audit_log.md | ZG9jcy90YWJsZXMvZ2l0aHViX2F1ZGl0X2xvZy5tZA== | 0 | 204 | +------+---------------------+---------------------------------+----------------------------------------------+------+------------+ ```
misraved commented 1 month ago

@ParthaI the implementation does not look correct since the two columns mentioned in the comment below are not returned by the GetConfig.

Reference - https://github.com/turbot/steampipe-plugin-github/pull/445/files#diff-b859c63e62f546ae6b1c4203d02d7866bc5172eb74f7a57d201aa21c74a705c1R140

Will it be possible to raise an issue with the GitHub API/Graphql team to add the following two fields in the response?

ParthaI commented 1 month ago

@misraved, I have pushed a commit to consistently populate the is_generated and mode column values.

Commit reference: https://github.com/turbot/steampipe-plugin-github/pull/445/commits/881047a86393dec03f3ae9ee9ae1f29623178b65

Could you please review the changes and let me know if everything looks good?

Thanks!