Skip to content

Commit

Permalink
Merge pull request #1338 from guardian/ts/update-cq-gh-plugin
Browse files Browse the repository at this point in the history
feat: add Github custom properties table to cloudquery
  • Loading branch information
tjsilver authored Dec 2, 2024
2 parents 8919560 + 0ae9c40 commit e8e39d1
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ CQ_POSTGRES_SOURCE=3.0.7
CQ_AWS=27.5.0

# See https://hub.cloudquery.io/plugins/source/cloudquery/github/versions
CQ_GITHUB=10.0.1
CQ_GITHUB=11.11.1

# See https://hub.cloudquery.io/plugins/source/cloudquery/fastly/versions
CQ_FASTLY=3.0.7
Expand Down
6 changes: 3 additions & 3 deletions packages/cdk/lib/__snapshots__/service-catalogue.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -13582,7 +13582,7 @@ spec:
spec:
name: github
path: cloudquery/github
version: v10.0.1
version: v11.11.1
tables:
- github_issues
destinations:
Expand Down Expand Up @@ -14707,7 +14707,7 @@ spec:
spec:
name: github
path: cloudquery/github
version: v10.0.1
version: v11.11.1
tables:
- github_repositories
- github_repository_branches
Expand Down Expand Up @@ -15422,7 +15422,7 @@ spec:
spec:
name: github
path: cloudquery/github
version: v10.0.1
version: v11.11.1
tables:
- github_organizations
- github_organization_members
Expand Down
2 changes: 1 addition & 1 deletion packages/cdk/lib/cloudquery/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ spec:
spec:
name: github
path: cloudquery/github
version: v10.0.1
version: v11.11.1
tables:
- github_repositories
destinations:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-- CreateTable
CREATE TABLE "github_repository_custom_properties" (
"_cq_sync_time" TIMESTAMP(6),
"_cq_source_name" TEXT,
"_cq_id" UUID NOT NULL,
"_cq_parent_id" UUID,
"org" TEXT NOT NULL,
"property_name" TEXT NOT NULL,
"repository_id" BIGINT NOT NULL,
"value" TEXT
);

-- CreateIndex
CREATE UNIQUE INDEX "github_repository_custom_properties__cq_id_key" ON "github_repository_custom_properties"("_cq_id");
13 changes: 13 additions & 0 deletions packages/common/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,19 @@ model github_repository_branches {
@@id([org, repository_id, name], map: "github_repository_branches_cqpk")
}

model github_repository_custom_properties {
cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6)
cq_source_name String? @map("_cq_source_name")
cq_id String @unique @map("_cq_id") @db.Uuid
cq_parent_id String? @map("_cq_parent_id") @db.Uuid
org String
property_name String
repository_id BigInt
value String?
@@ignore
}

model github_team_repositories {
cq_sync_time DateTime? @map("_cq_sync_time") @db.Timestamp(6)
cq_source_name String? @map("_cq_source_name")
Expand Down
1 change: 1 addition & 0 deletions packages/dev-environment/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ services:
- github_teams
- github_repositories
- github_repository_branches
- github_repository_custom_properties
- github_workflows
- github_languages
- aws_ec2_instances
Expand Down

0 comments on commit e8e39d1

Please sign in to comment.