CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

fix(building-itself): drop the misleading deployments zero; fix doubled title #5454

Merged⚡ AI-generatedXSccantynz wants to mergefix/proof-page-polishmainopened 24d ago
1 changed file+8−6
Modifiedsrc/routes/building-itself.tsx+8−6View fileUnifiedSplit
1818import { gte, sql } from "drizzle-orm";
1919import { db } from "../db";
2020import {
21 deployments,
2221 issues,
2322 prComments,
2423 pullRequests,
116115 prsMergedTotal,
117116 aiReviewsWeek,
118117 issuesClosedWeek,
119 deploysWeek,
118 prsOpenedWeek,
120119 repoCount,
121120 ] = await Promise.all([
122121 count(() =>
147146 sql`${issues.state} = 'closed' AND ${issues.updatedAt} >= ${weekAgo}`
148147 )
149148 ),
149 // NOT the deployments table: the timer-based deploy path that actually
150 // ships this platform never writes rows there (docs/ops/OPERATIONS.md),
151 // so it renders a misleading 0. PRs opened is tracked and true.
150152 count(() =>
151153 db
152154 .select({ n: sql<number>`count(*)::int` })
153 .from(deployments)
154 .where(gte(deployments.createdAt, weekAgo))
155 .from(pullRequests)
156 .where(gte(pullRequests.createdAt, weekAgo))
155157 ),
156158 count(() =>
157159 db.select({ n: sql<number>`count(*)::int` }).from(repositories)
162164 { n: prsMergedWeek, label: "pull requests merged", window: "last 7 days" },
163165 { n: aiReviewsWeek, label: "AI reviews posted", window: "last 7 days" },
164166 { n: issuesClosedWeek, label: "issues closed", window: "last 7 days" },
165 { n: deploysWeek, label: "deployments", window: "last 7 days" },
167 { n: prsOpenedWeek, label: "pull requests opened", window: "last 7 days" },
166168 { n: prsMergedTotal, label: "pull requests merged", window: "all time" },
167169 { n: repoCount, label: "repositories hosted", window: "all time" },
168170 ];
169171
170172 return c.html(
171 <Layout title="The platform that builds itself — gluecron" user={user}>
173 <Layout title="The platform that builds itself" user={user}>
172174 <style dangerouslySetInnerHTML={{ __html: styles }} />
173175 <div class="bi-wrap">
174176 <div class="bi-hero">
175177
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts