Analytics: star totals recorded every 30 minutes with the downloads (GitHub's own count), and the main chart switches between downloads and stars, with each app's total and new stars

This commit is contained in:
juansebsol committed 2026-10-21 20:58:49 -07:00
1 parent f534574239
commit 9dc4ceeacd
10 files changed
+99 -19

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ and filed by a GitHub App. Reporters never need a GitHub account.
- **GitHub issues:** search every issue, open and closed, across your connected repositories, including the ones opened directly on GitHub. Kept up to date every 2 minutes, no webhooks needed.
- **Repo status (optional):** every repository at a glance, like a team status board: open PRs and issues and the oldest open PR, the last commit, issue and PR, what happened in a window you pick (10 minutes to a week, since the last build, or all time: commits, PRs opened and merged, issues, people), and each latest build with its unreleased commits and downloads. Sort by any column; a totals row sums them up. Fix first ranks the open issues across the repositories by what they say (crash, hang, data loss beats "doesn't work"), who filed them, how many people pile on and how fresh they are, with the reasons beside each score. Most reported ranks the issues by how many Discord tickets are about them (a duplicate counts for its original; ones Claude suggested and nobody has reviewed yet are shown as waiting for review), over the last 7, 30 or 90 days or all time, with the tickets one click away, and says when an issue closed as fixed keeps being reported. Pull requests lists the open ones (the ones fixing the most reported issues first, with how many Discord tickets are about them), the merged ones waiting for a release, and the ones merged in the last 90 days; Fix first and Most reported show when someone's working on an issue or it's already fixed. Read in the background every 5 to 60 minutes with GitHub's GraphQL API, which has its own budget, so filing isn't affected. Off until you turn it on; you pick the repositories (your apps' ones to start with).
- **Analytics (optional):** downloads recorded every 30 minutes from when you turn it on (GitHub only keeps running totals), per app, platform, processor, format and version, from 30 minutes to 12 months at a time (today in 30-minute steps by default; steps of 30m, 1h, 3h, 6h, 12h or a day), in your own time zone. Next to them: tickets, issues opened and closed, pull requests merged and stars over the same time, each compared with the period before, and release health: Discord tickets while each release was the latest, per 1,000 of its downloads. Every chart has a table view.
- **Analytics (optional):** downloads recorded every 30 minutes from when you turn it on (GitHub only keeps running totals), per app, platform, processor, format and version, from 30 minutes to 12 months at a time (today in 30-minute steps by default; steps of 30m, 1h, 3h, 6h, 12h or a day), in your own time zone. The main chart switches between downloads and stars: new stars over time (back to each repository's first star) and each app's star total, read every 30 minutes with the downloads. Next to them: tickets, issues opened and closed, pull requests merged and stars over the same time, each compared with the period before, and release health: Discord tickets while each release was the latest, per 1,000 of its downloads. Every chart has a table view.
- **AI triage (optional):** Claude flags priority, duplicates, regressions, spam and more, and sorts tickets with your own label groups. Each action can be off, a suggestion, or automatic above a confidence threshold, with separate settings for issues opened directly on GitHub.
- AI triage › Review lists everything with suggestions waiting, from Discord tickets and GitHub issues. Every ticket shows its triage state (To review, Partly applied, Applied…), and suggestions say exactly what applying them does.
- Apply or dismiss in bulk, e.g. all duplicates at 80%+ confidence.
+3 -2
View File
@@ -127,7 +127,8 @@ Discord endpoint, OAuth), one or more queue workers, and an optional triage work
counts from its release's publication). Files are classified by name (`assets.ts`: platform,
architecture, format; checksums, signatures and update metadata aren't downloads). Detail is kept
32 days, then added up per UTC day (`download_days`). Stars come with when each was given, so
their history goes back to the first (`repo_stars`). The page buckets everything in the
their history goes back to the first (`repo_stars`); the same read keeps GitHub's own star total
per 30-minute slot (`repo_star_counts`, exact even when a star is taken back). The page buckets everything in the
viewer's time zone (a `tr_tz` cookie app.js sets): ranges from today to 12 months, steps from 30
minutes to a day (a step that would make over 400 buckets, or finer than a day beyond the 30-minute
detail, isn't offered). Charts are drawn by app.js from the numbers on the page.
@@ -232,7 +233,7 @@ stable user ID are recorded in the body.
| `submissions` | Tickets, routing snapshot, queue state, lease, reconcile counters, encrypted payload |
| `submission_events` | Append-only timeline for investigation |
| `contributor_settings`, `contributor_panels`, `contributor_tiers` | On/off, panel channel, published panel, and role tiers (role + minimum contributions) per workspace |
| `analytics_settings`, `download_assets`, `download_counts`, `download_days`, `download_sync`, `repo_stars` | Analytics: on/off; each release file and its total; downloads per 30 minutes (then per day); per repository, when recording began and the last slot read; stars with when each was given |
| `analytics_settings`, `download_assets`, `download_counts`, `download_days`, `download_sync`, `repo_stars`, `repo_star_counts` | Analytics: on/off; each release file and its total; downloads per 30 minutes (then per day); per repository, when recording began and the last slot read; stars with when each was given; star totals per 30 minutes |
| `pull_index` | Pull requests of the indexed repositories (open, and closed for 90 days), with the issues each is for |
| `repo_status_settings`, `repo_status` | Repo status: on/off, the repositories and how often per workspace; what was last read per repository (stats, the kept activity, the icon, the error and the GraphQL budget left) |
| `contributor_links`, `contributor_verifications` | One GitHub account ↔ one Discord member per workspace; audit trail of every verification |
+14 -1
View File
@@ -62,6 +62,8 @@ export interface AnalyticsData {
issuesClosed: Metric;
pullsMerged: Metric;
stars: Metric;
/** Per app: its star total as GitHub last counted it (every 30 minutes), and the stars given in the period. */
starsByApp: { label: string; total: number | null; gained: number }[];
releases: ReleaseHealth[];
}
@@ -172,6 +174,17 @@ export async function analyticsData(q: Queryable, workspaceId: string, repos: Re
`SELECT ${slot('starred_at')} AS at, count(*) AS n FROM repo_stars WHERE repo_id IN (SELECT value FROM json_each($1)) AND starred_at >= $2 AND starred_at < $3 GROUP BY 1`,
[repoIds, span[0], span[1]]));
const { rows: totals } = await q.query<{ repo_id: number; stars_total: number | null }>('SELECT repo_id, stars_total FROM download_sync WHERE repo_id IN (SELECT value FROM json_each($1))', [repoIds]);
const { rows: given } = await q.query<{ repo_id: number; n: number }>(
'SELECT repo_id, count(*) AS n FROM repo_stars WHERE repo_id IN (SELECT value FROM json_each($1)) AND starred_at >= $2 AND starred_at < $3 GROUP BY repo_id',
[repoIds, new Date(w.start), new Date(w.end)],
);
const totalOf = new Map(totals.map((t) => [t.repo_id, t.stars_total === null ? null : Number(t.stars_total)]));
const gainedOf = new Map(given.map((g) => [g.repo_id, Number(g.n)]));
const starsByApp = repos
.map((r) => ({ label: appNames.get(r.id) ?? r.name, total: totalOf.get(r.id) ?? null, gained: gainedOf.get(r.id) ?? 0 }))
.sort((a, b) => (b.total ?? -1) - (a.total ?? -1) || b.gained - a.gained);
// ---- Release health: tickets while each release was the latest, per 1,000 of its downloads ----
const releases: ReleaseHealth[] = [];
for (const repo of repos) {
@@ -199,7 +212,7 @@ export async function analyticsData(q: Queryable, workspaceId: string, repos: Re
}
releases.sort((a, b) => (b.publishedAt?.getTime() ?? 0) - (a.publishedAt?.getTime() ?? 0));
return { recordingSince, lastRead: lastReadMs ? new Date(lastReadMs) : null, downloads, tickets, issuesOpened, issuesClosed, pullsMerged, stars, releases: releases.slice(0, 15) };
return { recordingSince, lastRead: lastReadMs ? new Date(lastReadMs) : null, downloads, tickets, issuesOpened, issuesClosed, pullsMerged, stars, starsByApp, releases: releases.slice(0, 15) };
}
export { PLATFORM_NAMES };
+15 -3
View File
@@ -39,6 +39,7 @@ query AnalyticsReleases($owner: String!, $name: String!, $after: String) {
const STARS_QUERY = `
query AnalyticsStars($owner: String!, $name: String!, $after: String) {
repository(owner: $owner, name: $name) {
stargazerCount
stargazers(first: 100, after: $after, orderBy: {field: STARRED_AT, direction: DESC}) {
pageInfo { hasNextPage endCursor }
edges { starredAt node { login } }
@@ -237,15 +238,20 @@ export class AnalyticsRecorder {
}
}
/** The star history once (back to the first), then each time the stars added since. */
/**
* The star history once (back to the first), then each time the stars added since; and the
* repository's star total as GitHub counts it, kept per 30-minute slot like the downloads.
*/
private async recordStars(sync: SyncRow, now: number): Promise<void> {
const { db, github } = this.deps;
const since = sync.stars_loaded_at ? (sync.stars_until_at?.getTime() ?? 0) - 60_000 : null;
let newest = sync.stars_until_at?.getTime() ?? 0;
let after: string | null = null;
let complete = false;
let total: number | null = null;
for (let page = 0; page < (since === null ? STAR_PAGES : 5); page++) {
const d: any = await github!.graphql(sync.installation_id, STARS_QUERY, { owner: sync.owner, name: sync.name, after });
if (total === null && Number.isFinite(Number(d?.repository?.stargazerCount))) total = Number(d.repository.stargazerCount);
const conn = d?.repository?.stargazers;
let older = false;
for (const e of conn?.edges ?? []) {
@@ -266,9 +272,15 @@ export class AnalyticsRecorder {
after = conn.pageInfo.endCursor;
}
await db.query(
'UPDATE download_sync SET stars_loaded_at = CASE WHEN $2 = 1 THEN COALESCE(stars_loaded_at, $4) ELSE stars_loaded_at END, stars_until_at = $3 WHERE repo_id = $1',
[sync.repo_id, complete ? 1 : 0, newest ? new Date(newest) : null, new Date(now)],
'UPDATE download_sync SET stars_loaded_at = CASE WHEN $2 = 1 THEN COALESCE(stars_loaded_at, $4) ELSE stars_loaded_at END, stars_until_at = $3, stars_total = COALESCE($5, stars_total) WHERE repo_id = $1',
[sync.repo_id, complete ? 1 : 0, newest ? new Date(newest) : null, new Date(now), total],
);
if (total !== null) {
await db.query(
'INSERT INTO repo_star_counts (repo_id, slot_at, total) VALUES ($1, $2, $3) ON CONFLICT (repo_id, slot_at) DO UPDATE SET total = excluded.total',
[sync.repo_id, new Date(slotOf(now)), total],
);
}
}
}
+10
View File
@@ -0,0 +1,10 @@
-- Analytics: each repository's star total (GitHub's own count) every 30 minutes, with the download
-- snapshot. The star history (repo_stars) says when each star was given; these totals are exact
-- even when someone takes a star back.
CREATE TABLE repo_star_counts (
repo_id INTEGER NOT NULL,
slot_at INTEGER NOT NULL,
total INTEGER NOT NULL,
PRIMARY KEY (repo_id, slot_at)
);
ALTER TABLE download_sync ADD COLUMN stars_total INTEGER;
+3
View File
@@ -1790,6 +1790,9 @@ a.rs-why:hover { border-color: currentColor; }
.an-card { padding: 16px 20px 14px; overflow: visible; }
.an-ch { display: flex; align-items: baseline; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 10px; }
.an-ch h2 { margin: 0; font-size: 14px; font-weight: 600; }
.an-metric { height: 30px; }
.an-metric .seg-item { height: 26px; font-weight: 600; }
.an-up { color: var(--ok-text); font-size: 12px; margin-left: 4px; }
.an-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; align-items: start; }
.an-chart { margin: 0; }
.an-plot { position: relative; height: 240px; }
+33 -10
View File
@@ -85,14 +85,26 @@ export function registerAnalyticsRoutes(app: FastifyInstance, web: Web): void {
})}</ul>`;
}
/** Each app's star total (GitHub's count) and the stars it was given in the period. */
function starList(rows: AnalyticsData['starsByApp']): SafeHtml {
if (!rows.some((r) => r.total !== null || r.gained)) return html`<p class="small muted an-none">Star totals show up after the first read.</p>`;
const max = Math.max(1, ...rows.map((r) => r.total ?? 0));
return html`<ul class="an-bars">${rows.map((r) => html`<li>
<span class="an-bl">${r.label}</span>
<span class="an-bv num">${r.total === null ? '—' : n(r.total)} <span class="${r.gained ? 'an-up' : 'muted'}">+${n(r.gained)}</span></span>
<svg class="an-bar" viewBox="0 0 100 6" preserveAspectRatio="none" aria-hidden="true"><rect class="track" x="0" y="0" width="100" height="6" rx="3"></rect><rect class="fill" x="0" y="0" width="${Math.max(1, ((r.total ?? 0) / max) * 100).toFixed(2)}" height="6" rx="3"></rect></svg>
</li>`)}</ul>`;
}
function tile(label: string, value: string, d: SafeHtml, title?: string): SafeHtml {
return html`<div class="an-kpi" ${title ? html`title="${title}"` : ''}><div class="an-kl">${label}</div><div class="an-kv">${value}</div>${d}</div>`;
}
function body(ctx: WorkspaceRequestContext, w: Window, tz: string, d: AnalyticsData, repoChoice: string, apps: { id: number; name: string }[]): SafeHtml {
function body(ctx: WorkspaceRequestContext, w: Window, tz: string, d: AnalyticsData, repoChoice: string, apps: { id: number; name: string }[], metric: 'downloads' | 'stars'): SafeHtml {
const compare = w.range.compare;
const href = (o: { range?: string; step?: string | null; app?: string }) => {
const href = (o: { range?: string; step?: string | null; app?: string; metric?: string }) => {
const p = new URLSearchParams();
if ((o.metric ?? metric) === 'stars') p.set('metric', 'stars');
const range = o.range ?? w.range.id;
if (range !== 'today') p.set('range', range);
const step = o.step === undefined ? (o.range ? null : w.step.id) : o.step;
@@ -106,10 +118,14 @@ export function registerAnalyticsRoutes(app: FastifyInstance, web: Web): void {
const prevPerK = d.downloads.prev ? (d.tickets.prev ?? 0) / d.downloads.prev * 1000 : null;
// One repository (picked, or the only one): downloads by platform; several: all of them together.
const single = d.downloads.series.length > 1;
const noDownloads = !d.recordingSince || (d.downloads.total === 0 && d.recordingSince.getTime() > w.start);
const noDownloads = metric === 'downloads' && (!d.recordingSince || (d.downloads.total === 0 && d.recordingSince.getTime() > w.start));
const per = `per ${w.step.id === '1d' ? 'day' : w.step.label}`;
const switcher = html`<nav class="seg sm an-metric" aria-label="Chart">${([['downloads', 'Downloads'], ['stars', 'Stars']] as const).map(([id, label]) => html`<a class="seg-item" href="${href({ metric: id })}" ${id === metric ? raw('aria-current="true"') : ''}>${label}</a>`)}</nav>`;
const appLabel = single ? apps.find((a) => String(a.id) === repoChoice)?.name ?? apps[0]?.name ?? 'this app' : 'all apps';
return html`
<form method="get" action="${base(ctx)}" class="an-filters" aria-label="Filters">
${w.range.id !== 'today' ? html`<input type="hidden" name="range" value="${w.range.id}">` : ''}
${metric === 'stars' ? html`<input type="hidden" name="metric" value="stars">` : ''}
<label class="sr-only" for="an-app">App</label>
${selectWrap(html`<select id="an-app" name="app" data-autosubmit><option value="all" ${repoChoice === 'all' ? raw('selected') : ''}>All apps</option>${apps.map((a) => html`<option value="${String(a.id)}" ${String(a.id) === repoChoice ? raw('selected') : ''}>${a.name}</option>`)}</select>`, { sm: true })}
<noscript><button class="btn sm" type="submit">Apply</button></noscript>
@@ -133,18 +149,25 @@ export function registerAnalyticsRoutes(app: FastifyInstance, web: Web): void {
${tile('Stars', compact(d.stars.total), delta(d.stars.total, d.stars.prev, compare, 'up'))}
</div>
<section class="card an-card" aria-labelledby="an-dl-h">
<div class="an-ch"><h2 id="an-dl-h">Downloads</h2><span class="small muted">${single ? 'by platform' : 'all apps'} · per ${w.step.id === '1d' ? 'day' : w.step.label}</span></div>
${chart(w, tz, { id: 'downloads', title: 'Downloads', unit: 'Downloads', series: single ? d.downloads.series.map((s, i) => ({ ...s, slot: i + 1 })) : [{ ...d.downloads.series[0]!, slot: 1 }] })}
<section class="card an-card" aria-labelledby="an-main-h">
<div class="an-ch"><h2 id="an-main-h" class="sr-only">${metric === 'stars' ? 'Stars' : 'Downloads'}</h2>${switcher}<span class="small muted">${metric === 'stars'
? `new stars · ${appLabel} · ${per} · back to the first star`
: `${single ? 'by platform' : 'all apps'} · ${per}`}</span></div>
${metric === 'stars'
? chart(w, tz, { id: 'stars', title: 'New stars', unit: 'New stars', series: [{ key: 'stars', name: 'New stars', values: d.stars.values, slot: 1 }] })
: chart(w, tz, { id: 'downloads', title: 'Downloads', unit: 'Downloads', series: single ? d.downloads.series.map((s, i) => ({ ...s, slot: i + 1 })) : [{ ...d.downloads.series[0]!, slot: 1 }] })}
</section>
<div class="an-grid">
${metric === 'stars' ? html`<div class="an-grid">
<section class="card an-card" aria-labelledby="an-sb-h"><div class="an-ch"><h2 id="an-sb-h">Stars by app</h2><span class="small muted">total, and new in this period</span></div>${starList(d.starsByApp)}
<p class="small muted an-foot">Totals are GitHub’s own count, read every 30 minutes with the downloads, so a star taken back is counted out. New stars are the ones given in this period.</p></section>
</div>` : html`<div class="an-grid">
${single ? '' : html`<section class="card an-card" aria-labelledby="an-apps-h"><div class="an-ch"><h2 id="an-apps-h">By app</h2></div>${bars(d.downloads.byApp, { empty: 'No downloads in this period.' })}</section>`}
<section class="card an-card" aria-labelledby="an-pl-h"><div class="an-ch"><h2 id="an-pl-h">Platforms</h2></div>${bars(d.downloads.platforms, { empty: 'No downloads in this period.', colored: true })}</section>
<section class="card an-card" aria-labelledby="an-ar-h"><div class="an-ch"><h2 id="an-ar-h">Processor</h2></div>${bars(d.downloads.archs, { empty: 'No downloads in this period.' })}</section>
<section class="card an-card" aria-labelledby="an-fo-h"><div class="an-ch"><h2 id="an-fo-h">Formats</h2></div>${bars(d.downloads.formats, { empty: 'No downloads in this period.' })}</section>
<section class="card an-card" aria-labelledby="an-ve-h"><div class="an-ch"><h2 id="an-ve-h">Versions</h2></div>${bars(d.downloads.versions, { empty: 'No downloads in this period.' })}</section>
</div>
</div>`}
<section class="card an-card" aria-labelledby="an-act-h">
<div class="an-ch"><h2 id="an-act-h">Activity</h2><span class="small muted">per ${w.step.id === '1d' ? 'day' : w.step.label}</span></div>
@@ -178,7 +201,7 @@ export function registerAnalyticsRoutes(app: FastifyInstance, web: Web): void {
app.get('/w/:wid/analytics', async (req, reply) => {
const ctx = await web.requireWorkspace(req, reply, { permission: 'analytics.view' });
if (!ctx) return reply;
const q = req.query as { range?: string; step?: string; app?: string };
const q = req.query as { range?: string; step?: string; app?: string; metric?: string };
const edit = can(ctx.membership, 'analytics.edit');
const s = await getAnalyticsSettings(deps.db, ctx.workspace.id);
const tz = safeTimeZone((req.cookies as Record<string, string | undefined>).tr_tz);
@@ -209,7 +232,7 @@ export function registerAnalyticsRoutes(app: FastifyInstance, web: Web): void {
const w = windowOf(q.range, q.step, tz);
const picked = repoChoice === 'all' ? repos : repos.filter((r) => String(r.id) === repoChoice);
const data = await analyticsData(deps.db, ctx.workspace.id, picked, w, appNames);
content = html`<div class="an" data-an-tz="${tz}">${body(ctx, w, tz, data, repoChoice, choices)}</div>`;
content = html`<div class="an" data-an-tz="${tz}">${body(ctx, w, tz, data, repoChoice, choices, q.metric === 'stars' ? 'stars' : 'downloads')}</div>`;
}
const page = html`
${pageHeader({ title: 'Analytics', description: 'Downloads, tickets, issues, pull requests and stars over time.', actions })}
+18
View File
@@ -130,9 +130,13 @@ describe('Analytics: recording downloads', () => {
await tick(t0);
const stars = async () => (await env.db.query('SELECT login FROM repo_stars ORDER BY login')).rows.map((r) => r.login);
expect(await stars()).toEqual(['ana', 'ben']);
// GitHub's own total, per 30-minute slot, with the downloads.
expect((await env.db.query('SELECT slot_at, total FROM repo_star_counts')).rows).toEqual([{ slot_at: new Date(slotOf(t0)), total: 2 }]);
repo().stars!.push({ login: 'cy', at: new Date().toISOString() });
await tick(t0 + SLOT_MS);
expect(await stars()).toEqual(['ana', 'ben', 'cy']);
expect((await env.db.query('SELECT total FROM repo_star_counts ORDER BY slot_at')).rows.map((r) => r.total)).toEqual([2, 3]);
expect((await env.db.query('SELECT stars_total FROM download_sync')).rows[0].stars_total).toBe(3);
// 30-minute rows older than 32 days are added up per UTC day.
const old = Date.parse('2026-08-01T10:30:00Z');
const { rows } = await env.db.query('SELECT id FROM download_assets LIMIT 1');
@@ -188,6 +192,20 @@ describe('Analytics: the page', () => {
expect(berlin.body).toContain('data-an-tz="Europe/Berlin"');
});
it('switches the main chart to stars: new stars over time, and each app’s total', async () => {
await recorded();
const body = (await page('/analytics?range=7d&metric=stars')).body;
expect(body).toMatch(/aria-label="Chart"><a class="seg-item" href="[^"]*\/analytics\?range=7d"\s*>Downloads<\/a><a class="seg-item" href="[^"]*\/analytics\?metric=stars&amp;range=7d" aria-current="true">Stars<\/a>/);
expect(body).toContain('new stars · PhotoCraft');
expect(body).toMatch(/data-an-chart='[^']*&quot;name&quot;:&quot;New stars&quot;/);
// Total 2 (GitHub's count), 1 given in the last 7 days.
expect(body).toMatch(/Stars by app[\s\S]*?PhotoCraft<\/span>\s*<span class="an-bv num">2 <span class="an-up">\+1<\/span>/);
// The download breakdowns aren't shown; the app picker keeps the stars view.
expect(body).not.toContain('id="an-pl-h"');
expect(body).toContain('<input type="hidden" name="metric" value="stars">');
expect((await page('/analytics?range=7d')).body).toContain('id="an-pl-h"');
});
it('is on the Overview and in the sidebar; moderators need access, and Edit to turn it off', async () => {
await recorded();
expect((await page('')).body).toContain('Open Analytics');
+1 -1
View File
@@ -160,7 +160,7 @@ export class FakeGitHub {
if (query.includes('stargazers(')) {
const list = [...(r.stars ?? [])].sort((a, b) => at(b.at) - at(a.at));
const p = page(list, v.after, 100);
return { repository: { stargazers: { pageInfo: p.pageInfo, edges: p.nodes.map((x) => ({ starredAt: x.at, node: { login: x.login } })) } } };
return { repository: { stargazerCount: list.length, stargazers: { pageInfo: p.pageInfo, edges: p.nodes.map((x) => ({ starredAt: x.at, node: { login: x.login } })) } } };
}
if (query.includes('releases(')) {
const p = page(newestFirst(r.releases ?? [], (x) => x.published_at), v.after, 50);
+1 -1
View File
@@ -53,7 +53,7 @@ export function testDb(): Db {
export async function resetDb(db: Db = testDb()): Promise<void> {
db.exec('DELETE FROM sessions; DELETE FROM oauth_states; DELETE FROM workspaces; DELETE FROM users; DELETE FROM issue_index; DELETE FROM issue_index_repos; DELETE FROM process_status;');
db.exec('DELETE FROM pull_index; DELETE FROM repo_status; DELETE FROM download_counts; DELETE FROM download_days; DELETE FROM download_assets; DELETE FROM download_sync; DELETE FROM repo_stars;');
db.exec('DELETE FROM pull_index; DELETE FROM repo_status; DELETE FROM download_counts; DELETE FROM download_days; DELETE FROM download_assets; DELETE FROM download_sync; DELETE FROM repo_stars; DELETE FROM repo_star_counts;');
db.exec('UPDATE server_settings SET dev_mode_on_at = NULL, dev_mode_by = NULL, dev_mode_off_at = NULL;');
}