Skip to content

Commit

Permalink
feat: update common columns:
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamadch91 committed Dec 22, 2024
1 parent 3224c6d commit 526c973
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion steampipe-plugin-github/github/common_column.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
func commonColumns(c []*plugin.Column) []*plugin.Column {
return append(c, []*plugin.Column{
{
Name: "platform_account_id",
Name: "platform_integration_id",
Type: proto.ColumnType_STRING,
Description: "The Platform Account ID in which the resource is located.",
Transform: transform.FromField("IntegrationID"),
Expand Down
6 changes: 3 additions & 3 deletions steampipe-plugin-github/github/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,18 @@ func Plugin(ctx context.Context) *plugin.Plugin {

opengovernanceTable := false
for _, col := range table.Columns {
if col != nil && col.Name == "platform_account_id" {
if col != nil && col.Name == "platform_integration_id" {
opengovernanceTable = true
}
}

if opengovernanceTable {
if table.Get != nil {
table.Get.KeyColumns = append(table.Get.KeyColumns, plugin.OptionalColumns([]string{"platform_account_id", "platform_resource_id"})...)
table.Get.KeyColumns = append(table.Get.KeyColumns, plugin.OptionalColumns([]string{"platform_integration_id", "platform_resource_id"})...)
}

if table.List != nil {
table.List.KeyColumns = append(table.List.KeyColumns, plugin.OptionalColumns([]string{"platform_account_id", "platform_resource_id"})...)
table.List.KeyColumns = append(table.List.KeyColumns, plugin.OptionalColumns([]string{"platform_integration_id", "platform_resource_id"})...)
}
}
}
Expand Down

0 comments on commit 526c973

Please sign in to comment.