Skip to content
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
66 changes: 0 additions & 66 deletions schemas/supabase/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,34 +181,6 @@ class InstallationsInsert(TypedDict):
uninstalled_by: NotRequired[str | None]


class Issues(TypedDict):
id: int
created_at: datetime.datetime
run_id: int | None
installation_id: int
merged: bool
created_by: str | None
owner_id: int
owner_type: str
owner_name: str
repo_id: int
repo_name: str
issue_number: int


class IssuesInsert(TypedDict):
run_id: NotRequired[int | None]
installation_id: int
merged: bool
created_by: NotRequired[str | None]
owner_id: int
owner_type: str
owner_name: str
repo_id: int
repo_name: str
issue_number: int


class JiraGithubLinks(TypedDict):
id: int
jira_site_id: str
Expand Down Expand Up @@ -606,44 +578,6 @@ class UsageInsert(TypedDict):
lambda_request_id: NotRequired[str | None]


class UsageWithIssues(TypedDict):
id: int | None
created_at: datetime.datetime | None
is_completed: bool | None
token_input: int | None
token_output: int | None
user_id: int | None
installation_id: int | None
created_by: str | None
total_seconds: int | None
owner_id: int | None
owner_type: str | None
owner_name: str | None
repo_id: int | None
repo_name: str | None
issue_number: int | None
source: str | None
merged: bool | None


class UsageWithIssuesInsert(TypedDict):
is_completed: NotRequired[bool | None]
token_input: NotRequired[int | None]
token_output: NotRequired[int | None]
user_id: NotRequired[int | None]
installation_id: NotRequired[int | None]
created_by: NotRequired[str | None]
total_seconds: NotRequired[int | None]
owner_id: NotRequired[int | None]
owner_type: NotRequired[str | None]
owner_name: NotRequired[str | None]
repo_id: NotRequired[int | None]
repo_name: NotRequired[str | None]
issue_number: NotRequired[int | None]
source: NotRequired[str | None]
merged: NotRequired[bool | None]


class Users(TypedDict):
id: int
user_name: str
Expand Down
20 changes: 0 additions & 20 deletions services/supabase/create_user_request.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from constants.triggers import Trigger
from services.supabase.issues.get_issue import get_issue
from services.supabase.issues.insert_issue import insert_issue
from services.supabase.usage.insert_usage import insert_usage
from services.supabase.users.upsert_user import upsert_user
from utils.error.handle_exceptions import handle_exceptions
Expand All @@ -22,24 +20,6 @@ def create_user_request(
email: str | None,
lambda_info: dict[str, str | None] | None = None,
):
existing_issue = get_issue(
owner_type=owner_type,
owner_name=owner_name,
repo_name=repo_name,
pr_number=pr_number,
)

if not existing_issue:
insert_issue(
owner_id=owner_id,
owner_type=owner_type,
owner_name=owner_name,
repo_id=repo_id,
repo_name=repo_name,
pr_number=pr_number,
installation_id=installation_id,
)

# Extract Lambda context info if provided
lambda_log_group = lambda_info.get("log_group") if lambda_info else None
lambda_log_stream = lambda_info.get("log_stream") if lambda_info else None
Expand Down
30 changes: 0 additions & 30 deletions services/supabase/issues/get_issue.py

This file was deleted.

25 changes: 0 additions & 25 deletions services/supabase/issues/insert_issue.py

This file was deleted.

Loading