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_actions_artifact closes #136 #137

Merged
merged 7 commits into from
Feb 8, 2022
Merged

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Feb 1, 2022

Example query results

Results
> select
  *
from
  github_action_artifact
where
  repository_full_name = 'turbot/steampipe' limit 20;
+----------------------+-----------------------+-----------+---------------+-------------------------------------------------------------------------------+---------------------------+---------+----------
| repository_full_name | name                  | id        | size_in_bytes | archive_download_url                                                          | created_at                | expired | expires_a
+----------------------+-----------------------+-----------+---------------+-------------------------------------------------------------------------------+---------------------------+---------+----------
| turbot/steampipe     | build-artifact-darwin | 154568832 | 12068733      | https://api.github.com/repos/turbot/steampipe/actions/artifacts/154568832/zip | 2022-02-01T14:33:28+05:30 | false   | 2022-05-0
| turbot/steampipe     | build-artifact-linux  | 149141138 | 11164241      | https://api.github.com/repos/turbot/steampipe/actions/artifacts/149141138/zip | 2022-01-24T21:33:52+05:30 | false   | 2022-04-2
| turbot/steampipe     | test-logs             | 149125544 | 643944        | https://api.github.com/repos/turbot/steampipe/actions/artifacts/149125544/zip | 2022-01-24T21:17:14+05:30 | false   | 2022-04-2
| turbot/steampipe     | test-logs             | 149141139 | 643750        | https://api.github.com/repos/turbot/steampipe/actions/artifacts/149141139/zip | 2022-01-24T21:33:52+05:30 | false   | 2022-04-2
| turbot/steampipe     | build-artifact-linux  | 149135479 | 11164167      | https://api.github.com/repos/turbot/steampipe/actions/artifacts/149135479/zip | 2022-01-24T21:27:29+05:30 | false   | 2022-04-2
| turbot/steampipe     | build-artifact-darwin | 149135478 | 11550810      | https://api.github.com/repos/turbot/steampipe/actions/artifacts/149135478/zip | 2022-01-24T21:27:29+05:30 | false   | 2022-04-2
| turbot/steampipe     | build-artifact-linux  | 149125543 | 11164174      | https://api.github.com/repos/turbot/steampipe/actions/artifacts/149125543/zip | 2022-01-24T21:17:14+05:30 | false   | 2022-04-2
| turbot/steampipe     | build-artifact-darwin | 151036171 | 12001971      | https://api.github.com/repos/turbot/steampipe/actions/artifacts/151036171/zip | 2022-01-27T02:38:09+05:30 | false   | 2022-04-2
| turbot/steampipe     | test-logs             | 149606117 | 334475        | https://api.github.com/repos/turbot/steampipe/actions/artifacts/149606117/zip | 2022-01-25T11:54:44+05:30 | false   | 2022-04-2
| turbot/steampipe     | build-artifact-darwin | 149125542 | 11550811      | https://api.github.com/repos/turbot/steampipe/actions/artifacts/149125542/zip | 2022-01-24T21:17:14+05:30 | false   | 2022-04-2
| turbot/steampipe     | test-logs             | 151036173 | 644666        | https://api.github.com/repos/turbot/steampipe/actions/artifacts/151036173/zip | 2022-01-27T02:38:09+05:30 | false   | 2022-04-2
| turbot/steampipe     | build-artifact-linux  | 149606116 | 11138559      | https://api.github.com/repos/turbot/steampipe/actions/artifacts/149606116/zip | 2022-01-25T11:54:44+05:30 | false   | 2022-04-2
| turbot/steampipe     | build-artifact-darwin | 151468355 | 11556639      | https://api.github.com/repos/turbot/steampipe/actions/artifacts/151468355/zip | 2022-01-27T17:17:24+05:30 | false   | 2022-04-2
| turbot/steampipe     | build-artifact-darwin | 149606115 | 11517470      | https://api.github.com/repos/turbot/steampipe/actions/artifacts/149606115/zip | 2022-01-25T11:54:44+05:30 | false   | 2022-04-2
| turbot/steampipe     | build-artifact-linux  | 151468356 | 11173908      | https://api.github.com/repos/turbot/steampipe/actions/artifacts/151468356/zip | 2022-01-27T17:17:24+05:30 | false   | 2022-04-2
| turbot/steampipe     | build-artifact-linux  | 154568833 | 11657206      | https://api.github.com/repos/turbot/steampipe/actions/artifacts/154568833/zip | 2022-02-01T14:33:28+05:30 | false   | 2022-05-0
| turbot/steampipe     | test-logs             | 154568834 | 651809        | https://api.github.com/repos/turbot/steampipe/actions/artifacts/154568834/zip | 2022-02-01T14:33:28+05:30 | false   | 2022-05-0
| turbot/steampipe     | build-artifact-darwin | 149141137 | 11550810      | https://api.github.com/repos/turbot/steampipe/actions/artifacts/149141137/zip | 2022-01-24T21:33:52+05:30 | false   | 2022-04-2
| turbot/steampipe     | test-logs             | 149135480 | 643302        | https://api.github.com/repos/turbot/steampipe/actions/artifacts/149135480/zip | 2022-01-24T21:27:29+05:30 | false   | 2022-04-2
| turbot/steampipe     | test-logs             | 151468357 | 428922        | https://api.github.com/repos/turbot/steampipe/actions/artifacts/151468357/zip | 2022-01-27T17:17:24+05:30 | false   | 2022-04-2
+----------------------+-----------------------+-----------+---------------+-------------------------------------------------------------------------------+---------------------------+---------+----------

> select
  id,
  node_id,
  name,
  archive_download_url,
  expired
from
  github_action_artifact
where
  repository_full_name = 'turbot/steampipe' and not expired limit 10;
+-----------+------------------------------+-----------------------+-------------------------------------------------------------------------------+---------+
| id        | node_id                      | name                  | archive_download_url                                                          | expired |
+-----------+------------------------------+-----------------------+-------------------------------------------------------------------------------+---------+
| 149141139 | MDg6QXJ0aWZhY3QxNDkxNDExMzk= | test-logs             | https://api.github.com/repos/turbot/steampipe/actions/artifacts/149141139/zip | false   |
| 145181552 | MDg6QXJ0aWZhY3QxNDUxODE1NTI= | test-logs             | https://api.github.com/repos/turbot/steampipe/actions/artifacts/145181552/zip | false   |
| 149606115 | MDg6QXJ0aWZhY3QxNDk2MDYxMTU= | build-artifact-darwin | https://api.github.com/repos/turbot/steampipe/actions/artifacts/149606115/zip | false   |
| 149606117 | MDg6QXJ0aWZhY3QxNDk2MDYxMTc= | test-logs             | https://api.github.com/repos/turbot/steampipe/actions/artifacts/149606117/zip | false   |
| 149141138 | MDg6QXJ0aWZhY3QxNDkxNDExMzg= | build-artifact-linux  | https://api.github.com/repos/turbot/steampipe/actions/artifacts/149141138/zip | false   |
| 151036171 | MDg6QXJ0aWZhY3QxNTEwMzYxNzE= | build-artifact-darwin | https://api.github.com/repos/turbot/steampipe/actions/artifacts/151036171/zip | false   |
| 149606116 | MDg6QXJ0aWZhY3QxNDk2MDYxMTY= | build-artifact-linux  | https://api.github.com/repos/turbot/steampipe/actions/artifacts/149606116/zip | false   |
| 154568832 | MDg6QXJ0aWZhY3QxNTQ1Njg4MzI= | build-artifact-darwin | https://api.github.com/repos/turbot/steampipe/actions/artifacts/154568832/zip | false   |
| 151036173 | MDg6QXJ0aWZhY3QxNTEwMzYxNzM= | test-logs             | https://api.github.com/repos/turbot/steampipe/actions/artifacts/151036173/zip | false   |
| 154568834 | MDg6QXJ0aWZhY3QxNTQ1Njg4MzQ= | test-logs             | https://api.github.com/repos/turbot/steampipe/actions/artifacts/154568834/zip | false   |
+-----------+------------------------------+-----------------------+-------------------------------------------------------------------------------+---------+

@ParthaI ParthaI self-assigned this Feb 1, 2022
@ParthaI ParthaI linked an issue Feb 1, 2022 that may be closed by this pull request
@ParthaI ParthaI changed the title Add table github_action_artifact closes #136 Add table github_actions_artifact closes #136 Feb 4, 2022
@ParthaI ParthaI linked an issue Feb 4, 2022 that may be closed by this pull request
{Name: "archive_download_url", Type: proto.ColumnType_STRING, Transform: transform.FromField("ArchiveDownloadURL"), Description: "Archive download URL for the artifact."},
{Name: "created_at", Type: proto.ColumnType_TIMESTAMP, Transform: transform.FromField("CreatedAt").Transform(convertTimestamp), Description: "Time when the artifact was created."},
{Name: "expired", Type: proto.ColumnType_BOOL, Description: "It defines wheather the artifact is expires or not."},
{Name: "expires_at", Type: proto.ColumnType_TIMESTAMP, Transform: transform.FromField("ExpiresAt").Transform(convertTimestamp), Description: "Time when the artifact expires."},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if ExpiresAt is null or empty, will the query return any error?

Copy link
Contributor

@bigdatasourav bigdatasourav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bigdatasourav bigdatasourav merged commit 0e37497 into main Feb 8, 2022
@bigdatasourav bigdatasourav deleted the issue-136 branch February 8, 2022 06:55
mheiges pushed a commit to mheiges/steampipe-plugin-github that referenced this pull request May 6, 2022
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.

Add table github_action_artifact Add tables github_action_*
2 participants