mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-05 05:05:08 +02:00
fix: select existing columns from ship_logs in weekly digest
P2 from Codex review: weekly digest selected nonexistent 'email' column from ship_logs, causing a silent Supabase error that dropped all ship activity from the digest. Now selects user_id, version, branch, pr_url which all exist in the schema. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -134,7 +134,7 @@ Deno.serve(async (_req: Request) => {
|
||||
.eq('team_id', teamId)
|
||||
.gte('timestamp', weekAgo),
|
||||
supabase.from('ship_logs')
|
||||
.select('user_id, email')
|
||||
.select('user_id, version, branch, pr_url')
|
||||
.eq('team_id', teamId)
|
||||
.gte('created_at', weekAgo),
|
||||
supabase.from('session_transcripts')
|
||||
@@ -178,7 +178,7 @@ Deno.serve(async (_req: Request) => {
|
||||
// Ships by person
|
||||
const shipsByPerson = new Map<string, number>();
|
||||
for (const log of shipLogs) {
|
||||
const key = String(log.email || log.user_id || 'unknown');
|
||||
const key = String(log.user_id || 'unknown');
|
||||
shipsByPerson.set(key, (shipsByPerson.get(key) || 0) + 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user