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

feat: add Github custom properties table to cloudquery #1338

Merged
merged 6 commits into from
Dec 2, 2024

Conversation

tjsilver
Copy link
Contributor

@tjsilver tjsilver commented Nov 28, 2024

What does this change?

  • upgrades github cloudquery plugin to v11 which provides a custom properties table
  • creates a github_repository_custom_properties table in prisma schema
  • creates the sql migration
  • adds the table to the docker-compose so that it can be queried in DEV

Why?

This follows from #1316. Using custom properties will allow us to move away from topics. Custom properties can be
made compulsory, which means we can enforce repos to choose a property.

The production custom property also applies branch protection.

How has it been verified?

  • Migration applied to CODE - the Github tables are copied from CODE to DEV for local testing
  • Tested locally - 14 rows returned

@tjsilver tjsilver changed the title feat: add github_repository_custom_properties table to cloudquery feat: add Github custom properties table to cloudquery Nov 28, 2024
@tjsilver tjsilver marked this pull request as ready for review December 2, 2024 10:33
@tjsilver tjsilver requested review from a team as code owners December 2, 2024 10:33
repository_id BigInt
value String?

@@ignore
Copy link
Member

Choose a reason for hiding this comment

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

What does this do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question! This means that it's ignored by the Prisma client (see docs). I added @@ignore to this model, as we currently don't need it because we're not doing anything with the table in service catalogue. The model being the schema means that the table will be kept up to date nonentheless, IIUC. When we start to interact with the data via the Prisma client in future work, then we will stop ignoring it.

Copy link
Member

Choose a reason for hiding this comment

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

Ah I see. Thanks for the extra info!

Copy link
Member

@kelvin-chappell kelvin-chappell left a comment

Choose a reason for hiding this comment

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

👍

@tjsilver tjsilver merged commit e8e39d1 into main Dec 2, 2024
7 checks passed
@tjsilver tjsilver deleted the ts/update-cq-gh-plugin branch December 2, 2024 16:17
Copy link
Member

@akash1810 akash1810 left a comment

Choose a reason for hiding this comment

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

Should we explicitly add this new table to the ones we're collecting?

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.

3 participants