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

Add Github team slug to view_repo_ownership #831

Merged
merged 5 commits into from
Mar 6, 2024

Conversation

chrislomaxjones
Copy link
Contributor

What does this change?

This PR adds a new Prisma migration that drops and recreates the view_repo_ownership view.

The migration contains some breaking schema changes:

  • Add column github_team_slug.
  • Add column short_repo_name.
  • Drop column repo_name.
  • Renamed the full_name column to full_repo_name.

As some of these changes are breaking, this required changes in the Recocop application code, which are included as part of this PR.

Note

Applying the migration without deploying the new Repocop application will break Repocop (as field names have changed). This shouldn't be a problem in reality, as Repocop runs on a schedule such that we should be able to migrate the database and deploy the new application between invocations.

Why?

Making the team slug available in this view should ease sending notifications to Anghammarad, as we previously had to join this data with another table to retrieve team slugs.

How has it been verified?

The dev migration was successfully applied locally. On approval, we'll also test this migration on CODE.

@chrislomaxjones chrislomaxjones requested review from a team as code owners March 4, 2024 12:43
@chrislomaxjones chrislomaxjones changed the title Nt clj/add slug to view repo ownership Add Github team slug to view_repo_ownership Mar 4, 2024
Copy link
Contributor

@tjsilver tjsilver left a comment

Choose a reason for hiding this comment

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

👍

@chrislomaxjones chrislomaxjones force-pushed the nt-clj/add-slug-to-view-repo-ownership branch from 9fd9d53 to f9c9b73 Compare March 4, 2024 12:44
@chrislomaxjones chrislomaxjones force-pushed the nt-clj/add-slug-to-view-repo-ownership branch from f9c9b73 to 660996a Compare March 5, 2024 10:21
chrislomaxjones and others added 5 commits March 6, 2024 16:21
- Add team slug
- Add repo short name

Co-authored-by: Natasha <[email protected]>
These changes were automatically created by running ```npm -w cli start migrate -- --stage DEV`

Co-authored-by: Natasha <[email protected]>
Co-authored-by: Natasha <[email protected]>
Co-authored-by: Akash Askoolum <[email protected]>
Co-authored-by: TJ Silver <[email protected]>
Co-authored-by: Natasha <[email protected]>
Co-authored-by: Akash Askoolum <[email protected]>
Co-authored-by: TJ Silver <[email protected]>
@NovemberTang NovemberTang force-pushed the nt-clj/add-slug-to-view-repo-ownership branch from 660996a to 1262d3c Compare March 6, 2024 16:21
@NovemberTang NovemberTang enabled auto-merge (squash) March 6, 2024 16:21
@NovemberTang NovemberTang merged commit 38e1700 into main Mar 6, 2024
2 checks passed
@NovemberTang NovemberTang deleted the nt-clj/add-slug-to-view-repo-ownership branch March 6, 2024 16:23
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.

4 participants