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

chore(fdr): update git datamodel to reflect github api #1496

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions fern/apis/fdr/definition/git.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ types:

GithubUser:
properties:
name: string
email: string
name: optional<string>
email: optional<string>
username: string

GithubTeam:
Expand All @@ -95,7 +95,7 @@ types:
pullRequestNumber: integer
repositoryName: string
repositoryOwner: string
author: GithubUser
author: optional<GithubUser>
reviewers: list<PullRequestReviewer>
title: string
url: string
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "PullRequest" ALTER COLUMN "author" DROP NOT NULL;
2 changes: 1 addition & 1 deletion servers/fdr/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ model PullRequest {
repositoryName String
repository Repository @relation(fields: [repositoryOwner, repositoryName], references: [owner, name], onDelete: Cascade)

author Bytes
author Bytes?
reviewers Bytes
checks Bytes

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion servers/fdr/src/db/git/GitDao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ function convertPrismaPullRequest(maybePR: prisma.PullRequest | null): PullReque
pullRequestNumber: maybePR.pullRequestNumber,
repositoryName: maybePR.repositoryName,
repositoryOwner: maybePR.repositoryOwner,
author: readBuffer(maybePR.author) as GithubUser,
author: maybePR.author != null ? (readBuffer(maybePR.author) as GithubUser) : undefined,
reviewers: readBuffer(maybePR.reviewers) as PullRequestReviewer[],
checks: readBuffer(maybePR.checks) as CheckRun[],
title: maybePR.title,
Expand Down
Loading