-
Notifications
You must be signed in to change notification settings - Fork 3
Add AI pre-review for devlogs and projects #32
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
Open
bbarni2020
wants to merge
6
commits into
hackclub:staging
Choose a base branch
from
bbarni2020:main
base: staging
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1b64ccd
Add AI pre-review for devlogs and projects
bbarni2020 8d1e549
Fixed drizzle
bbarni2020 72f0685
Cleaned up merge conflicts and fixes
bbarni2020 699b4de
Add AI review tables
bbarni2020 e568b22
Show message when countdown is over
bbarni2020 e8df8d3
Move to new pr "Show message when countdown is over"
bbarni2020 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ALTER TABLE "user" ADD COLUMN "isPrinter" boolean DEFAULT false NOT NULL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| CREATE TABLE "ai_devlog_review" ( | ||
| "id" serial PRIMARY KEY NOT NULL, | ||
| "devlogId" integer NOT NULL, | ||
| "projectId" integer NOT NULL, | ||
| "approved" boolean NOT NULL, | ||
| "rationale" text NOT NULL, | ||
| "prompt" text NOT NULL, | ||
| "model" text NOT NULL, | ||
| "createdAt" timestamp DEFAULT now() NOT NULL, | ||
| "updatedAt" timestamp DEFAULT now() NOT NULL, | ||
| CONSTRAINT "ai_devlog_review_devlogId_unique" UNIQUE("devlogId") | ||
| ); | ||
| --> statement-breakpoint | ||
| CREATE TABLE "ai_project_review" ( | ||
| "id" serial PRIMARY KEY NOT NULL, | ||
| "projectId" integer NOT NULL, | ||
| "overallApproved" boolean NOT NULL, | ||
| "summary" text NOT NULL, | ||
| "prompt" text NOT NULL, | ||
| "model" text NOT NULL, | ||
| "createdAt" timestamp DEFAULT now() NOT NULL, | ||
| "updatedAt" timestamp DEFAULT now() NOT NULL, | ||
| CONSTRAINT "ai_project_review_projectId_unique" UNIQUE("projectId") | ||
| ); | ||
| --> statement-breakpoint | ||
| ALTER TABLE "ai_devlog_review" ADD CONSTRAINT "ai_devlog_review_devlogId_devlog_id_fk" FOREIGN KEY ("devlogId") REFERENCES "public"."devlog"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint | ||
| ALTER TABLE "ai_devlog_review" ADD CONSTRAINT "ai_devlog_review_projectId_project_id_fk" FOREIGN KEY ("projectId") REFERENCES "public"."project"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint | ||
| ALTER TABLE "ai_project_review" ADD CONSTRAINT "ai_project_review_projectId_project_id_fk" FOREIGN KEY ("projectId") REFERENCES "public"."project"("id") ON DELETE no action ON UPDATE no action; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| ALTER TABLE "project" ADD COLUMN "printedBy" serial NOT NULL;--> statement-breakpoint | ||
| ALTER TABLE "project" ADD CONSTRAINT "project_printedBy_user_id_fk" FOREIGN KEY ("printedBy") REFERENCES "public"."user"("id") ON DELETE no action ON UPDATE no action; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| ALTER TABLE "project" ALTER COLUMN "printedBy" SET DATA TYPE integer;--> statement-breakpoint | ||
| ALTER TABLE "project" ALTER COLUMN "printedBy" DROP NOT NULL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| CREATE TYPE "public"."editor_file_type" AS ENUM('url', 'upload');--> statement-breakpoint | ||
| ALTER TABLE "project" ADD COLUMN "editorFileType" "editor_file_type";--> statement-breakpoint | ||
| ALTER TABLE "project" ADD COLUMN "editorUrl" text;--> statement-breakpoint | ||
| ALTER TABLE "project" ADD COLUMN "uploadedFileUrl" text; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ALTER TABLE "project" ADD COLUMN "modelFile" text; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| CREATE TABLE "ship" ( | ||
| "id" serial PRIMARY KEY NOT NULL, | ||
| "userId" integer NOT NULL, | ||
| "projectId" integer NOT NULL, | ||
| "url" text NOT NULL, | ||
| "editorFileType" "editor_file_type" NOT NULL, | ||
| "editorUrl" text, | ||
| "uploadedFileUrl" text, | ||
| "modelFile" text NOT NULL, | ||
| "timestamp" timestamp DEFAULT now() NOT NULL | ||
| ); | ||
| --> statement-breakpoint | ||
| ALTER TABLE "ship" ADD CONSTRAINT "ship_userId_user_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint | ||
| ALTER TABLE "ship" ADD CONSTRAINT "ship_projectId_project_id_fk" FOREIGN KEY ("projectId") REFERENCES "public"."project"("id") ON DELETE no action ON UPDATE no action; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| CREATE TABLE "ai_devlog_review" ( | ||
| "id" serial PRIMARY KEY NOT NULL, | ||
| "devlogId" integer NOT NULL, | ||
| "projectId" integer NOT NULL, | ||
| "approved" boolean NOT NULL, | ||
| "rationale" text NOT NULL, | ||
| "prompt" text NOT NULL, | ||
| "model" text NOT NULL, | ||
| "createdAt" timestamp DEFAULT now() NOT NULL, | ||
| "updatedAt" timestamp DEFAULT now() NOT NULL, | ||
| CONSTRAINT "ai_devlog_review_devlogId_unique" UNIQUE("devlogId") | ||
| ); | ||
| --> statement-breakpoint | ||
| CREATE TABLE "ai_project_review" ( | ||
| "id" serial PRIMARY KEY NOT NULL, | ||
| "projectId" integer NOT NULL, | ||
| "overallApproved" boolean NOT NULL, | ||
| "summary" text NOT NULL, | ||
| "prompt" text NOT NULL, | ||
| "model" text NOT NULL, | ||
| "createdAt" timestamp DEFAULT now() NOT NULL, | ||
| "updatedAt" timestamp DEFAULT now() NOT NULL, | ||
| CONSTRAINT "ai_project_review_projectId_unique" UNIQUE("projectId") | ||
| ); | ||
| --> statement-breakpoint | ||
| ALTER TABLE "ai_devlog_review" ADD CONSTRAINT "ai_devlog_review_devlogId_devlog_id_fk" FOREIGN KEY ("devlogId") REFERENCES "public"."devlog"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint | ||
| ALTER TABLE "ai_devlog_review" ADD CONSTRAINT "ai_devlog_review_projectId_project_id_fk" FOREIGN KEY ("projectId") REFERENCES "public"."project"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint | ||
| ALTER TABLE "ai_project_review" ADD CONSTRAINT "ai_project_review_projectId_project_id_fk" FOREIGN KEY ("projectId") REFERENCES "public"."project"("id") ON DELETE no action ON UPDATE no action; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a discrepancy between migration files 0004_milky_iron_patriot.sql and 0010_swift_korg.sql. The former uses ON DELETE cascade for foreign keys while the latter uses ON DELETE no action. Since 0010 appears to be the final/correct migration that should be run, this inconsistency suggests 0004_milky_iron_patriot.sql is an outdated duplicate that should be removed to avoid confusion.