Skip to content

Commit 8a2c71f

Browse files
committed
fix: add identifiers for organization and repository tables
1 parent db66fdc commit 8a2c71f

30 files changed

+281
-109
lines changed

cloudql/github/table_github_organization_app.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ func tableGitHubOrganizationApp() *plugin.Table {
2323
Columns: commonColumns([]*plugin.Column{
2424
{Name: "id", Type: proto.ColumnType_INT, Description: "The unique identifier of the app.",
2525
Transform: transform.FromField("Description.ID")},
26-
26+
{Name: "organization_id", Type: proto.ColumnType_INT, Description: "The unique identifier of the app.",
27+
Transform: transform.FromField("Description.OrganizationID")},
2728
{Name: "client_id", Type: proto.ColumnType_STRING, Description: "The client ID of the app.",
2829
Transform: transform.FromField("Description.ClientID")},
2930

cloudql/github/table_github_organization_collaborator.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ import (
1414

1515
func gitHubOrganizationCollaborators() []*plugin.Column {
1616
tableCols := []*plugin.Column{
17+
{
18+
Name: "organization_id", Type: proto.ColumnType_INT, Description: "The unique identifier of the app.",
19+
Transform: transform.FromField("Description.OrganizationID")},
1720
{
1821
Name: "affiliation",
1922
Type: proto.ColumnType_STRING,

cloudql/github/table_github_organization_dependabot_alert.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ func gitHubDependabotAlertColumns() []*plugin.Column {
155155
Description: "The time that the alert was no longer detected and was considered fixed.",
156156
Transform: transform.FromField("Description.FixedAt").NullIfZero().Transform(convertTimestamp),
157157
},
158+
{
159+
Name: "organization_id", Type: proto.ColumnType_INT, Description: "The unique identifier of the app.",
160+
Transform: transform.FromField("Description.OrganizationID")},
158161
}
159162
}
160163

cloudql/github/table_github_organization_external_identity.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ func gitHubOrganizationExternalIdentityColumns() []*plugin.Column {
2121
Transform: transform.FromField("Description.ScimIdentity")},
2222
{Name: "organization_invitation", Type: proto.ColumnType_JSON, Description: "The invitation to the organization.",
2323
Transform: transform.FromField("Description.OrganizationInvitation")},
24+
{Name: "organization_id", Type: proto.ColumnType_INT, Description: "The unique identifier of the app.",
25+
Transform: transform.FromField("Description.OrganizationID")},
2426
}
2527
}
2628

cloudql/github/table_github_organization_member.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ func gitHubOrganizationMemberColumns() []*plugin.Column {
4040
Transform: transform.FromField("Description.WebsiteURL")},
4141
{Name: "status", Type: proto.ColumnType_BOOL, Description: "",
4242
Transform: transform.FromField("Description.Status")},
43+
{Name: "organization_id", Type: proto.ColumnType_INT, Description: "The unique identifier of the app.",
44+
Transform: transform.FromField("Description.OrganizationID")},
4345
}
4446

4547
return cols

cloudql/github/table_github_organization_role.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ func gitHubOrganizationRoleColumns() []*plugin.Column {
4949
Type: proto.ColumnType_TIMESTAMP,
5050
Description: "",
5151
Transform: transform.FromField("Description.UpdatedAt")},
52+
{
53+
Name: "organization_id", Type: proto.ColumnType_INT, Description: "The unique identifier of the app.",
54+
Transform: transform.FromField("Description.OrganizationID")},
5255
}
5356

5457
return tableCols

cloudql/github/table_github_repository.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,9 @@ func sharedRepositoryColumns() []*plugin.Column {
479479
Transform: transform.FromField("Description.Metrics.Subscribers"),
480480
Description: "Subscribers.",
481481
},
482+
{
483+
Name: "organization_id", Type: proto.ColumnType_INT, Description: "The unique identifier of the app.",
484+
Transform: transform.FromField("Description.OrganizationID")},
482485
}
483486
}
484487

cloudql/github/table_github_repository_deployment.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ func gitHubRepositoryDeploymentColumns() []*plugin.Column {
7070
{Name: "updated_at", Type: proto.ColumnType_TIMESTAMP,
7171
Transform: transform.FromField("Description.UpdatedAt").NullIfZero().Transform(convertTimestamp),
7272
Description: "Timestamp when the deployment was last updated."},
73+
{
74+
Name: "organization_id", Type: proto.ColumnType_INT, Description: "The unique identifier of the app.",
75+
Transform: transform.FromField("Description.OrganizationID")},
7376
}
7477
}
7578

cloudql/github/table_github_repository_environment.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ func gitHubRepositoryEnvironmentColumns() []*plugin.Column {
3434
Transform: transform.FromField("Description.RepositoryName"),
3535
Description: "repository name",
3636
},
37+
{
38+
Name: "organization_id", Type: proto.ColumnType_INT, Description: "The unique identifier of the app.",
39+
Transform: transform.FromField("Description.OrganizationID")},
3740
}
3841
}
3942

cloudql/github/table_github_repository_permission.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ func tableGitHubRepositoryPermission() *plugin.Table {
6363
Transform: transform.FromField("Description.RoleName"),
6464
Description: "The full name of the repository (login/repo-name).",
6565
},
66+
{
67+
Name: "organization_id", Type: proto.ColumnType_INT, Description: "The unique identifier of the app.",
68+
Transform: transform.FromField("Description.OrganizationID")},
6669
}),
6770
}
6871
}

0 commit comments

Comments
 (0)