From 2aa4f42d303d096ff6df16227912cd4b6e4e42e4 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 22 Dec 2024 03:37:01 +0330 Subject: [PATCH] fix: fixed repository steampipe table --- provider/describer/action_workflow_run.go | 1 + .../github/table_github_repository.go | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/provider/describer/action_workflow_run.go b/provider/describer/action_workflow_run.go index 904c105c..ffb479f9 100644 --- a/provider/describer/action_workflow_run.go +++ b/provider/describer/action_workflow_run.go @@ -20,6 +20,7 @@ func GetAllWorkflowRuns(ctx context.Context, githubClient GitHubClient, organiza if err != nil { return nil, fmt.Errorf("error fetching repositories for workflow runs: %w", err) } + log.Println(repositories) sdk := newResilientSDK(githubClient.Token) diff --git a/steampipe-plugin-github/github/table_github_repository.go b/steampipe-plugin-github/github/table_github_repository.go index 7179aa5e..64438327 100644 --- a/steampipe-plugin-github/github/table_github_repository.go +++ b/steampipe-plugin-github/github/table_github_repository.go @@ -142,9 +142,15 @@ func sharedRepositoryColumns() []*plugin.Column { Description: "Source repository details if the repository is forked.", }, { - Name: "languages", + Name: "primary_language", + Type: proto.ColumnType_STRING, + Transform: transform.FromField("Description.PrimaryLanguage"), + Description: "Primary language used in the repository.", + }, + { + Name: "language_breakdown", Type: proto.ColumnType_JSON, - Transform: transform.FromField("Description.Languages"), + Transform: transform.FromField("Description.LanguageBreakdown"), Description: "Languages used in the repository along with their usage statistics.", }, {