-
Notifications
You must be signed in to change notification settings - Fork 38
feat(db): add user_github_app_tokens schema and migration #3168
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
Merged
kilo-code-bot
merged 5 commits into
convoy/mvp-commit-as-user-via-github-app-user-t/db234b74/head
from
convoy/mvp-commit-as-user-via-github-app-user-t/db234b74/gt/toast/f6df6608
May 11, 2026
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f73f224
feat(db): add user_github_app_tokens table with enums and migration
3a11052
chore(env): plumb USER_GH_APP_TOKEN_ENCRYPTION_KEY across web and git…
aac1da0
feat(worker-utils): add redactGitHubTokens for ghu_/ghr_ patterns
704715a
fix: address PR review - GDPR soft-delete gap and encryption key in vars
68d8ab4
fix: use correct column name github_app_type in test
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
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,21 @@ | ||
| CREATE TYPE "public"."github_app_type" AS ENUM('standard', 'lite');--> statement-breakpoint | ||
| CREATE TYPE "public"."revocation_reason" AS ENUM('user_revoked', 'refresh_failed', 'admin');--> statement-breakpoint | ||
| CREATE TABLE "user_github_app_tokens" ( | ||
| "id" uuid PRIMARY KEY DEFAULT pg_catalog.gen_random_uuid() NOT NULL, | ||
| "kilo_user_id" text NOT NULL, | ||
| "github_app_type" "github_app_type" DEFAULT 'standard' NOT NULL, | ||
| "github_user_id" text NOT NULL, | ||
| "github_login" text NOT NULL, | ||
| "github_email" text, | ||
| "access_token_encrypted" text NOT NULL, | ||
| "access_token_expires_at" timestamp with time zone NOT NULL, | ||
| "revoked_at" timestamp with time zone, | ||
| "revocation_reason" "revocation_reason", | ||
| "created_at" timestamp with time zone DEFAULT now() NOT NULL, | ||
| "updated_at" timestamp with time zone DEFAULT now() NOT NULL, | ||
| "last_used_at" timestamp with time zone | ||
| ); | ||
| --> statement-breakpoint | ||
| ALTER TABLE "user_github_app_tokens" ADD CONSTRAINT "user_github_app_tokens_kilo_user_id_kilocode_users_id_fk" FOREIGN KEY ("kilo_user_id") REFERENCES "public"."kilocode_users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint | ||
| CREATE UNIQUE INDEX "user_github_app_tokens_user_app_uidx" ON "user_github_app_tokens" USING btree ("kilo_user_id","github_app_type");--> statement-breakpoint | ||
| CREATE INDEX "user_github_app_tokens_github_user_id_idx" ON "user_github_app_tokens" USING btree ("github_user_id"); | ||
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.
Uh oh!
There was an error while loading. Please reload this page.