steampipe-plugin-github
steampipe-plugin-github copied to clipboard
Add table `github_blob`
Add the table github_blob
Allows the github blobs to be joined to a github tree to access a specific file's contents, for example to check for configuration files or README's.
Example query results
select
tree_sha,
truncated,
path,
mode,
type,
sha,
decode(content, encoding) as content
from
github_tree t
left outer join
github_blob b on b.repository_full_name = t.repository_full_name and b.blob_sha = t.sha
where
t.repository_full_name = 'turbot/steampipe'
and tree_sha = '0f200416c44b8b85277d973bff933efa8ef7803a'
and path = 'Makefile';
Results
+------------------------------------------+-----------+----------+--------+------+------------------------------------------+-------------------------------------------+
| tree_sha | truncated | path | mode | type | sha | content |
+------------------------------------------+-----------+----------+--------+------+------------------------------------------+-------------------------------------------+
| 0f200416c44b8b85277d973bff933efa8ef7803a | false | Makefile | 100644 | blob | 4650745ea73b4769919e29f3882a05d1351e2212 | |
| | | | | | | steampipe: |
| | | | | | | go build -o /usr/local/bin/steampipe |
| | | | | | | |
| | | | | | | dashboard_assets: |
| | | | | | | $(MAKE) -C ui/dashboard |
| | | | | | | |
| | | | | | | all: |
| | | | | | | $(MAKE) -C pluginmanager |
| | | | | | | $(MAKE) -C ui/dashboard |
| | | | | | | go build -o /usr/local/bin/steampipe |
| | | | | | | |
+------------------------------------------+-----------+----------+--------+------+------------------------------------------+-------------------------------------------+
The current approach is a single call per blob, which is limited when it comes to rate limiting.
Welcome to Steampipe @rmhartog and thank you so much for raising the PR for a new table 👍.