feat(cache): mirror §22.4c review fields into cached_rfcs

This commit is contained in:
Ben Stull
2026-06-03 22:42:05 -07:00
parent 2d9022b19e
commit 8f21dc5f9c
2 changed files with 34 additions and 2 deletions
+10 -2
View File
@@ -87,8 +87,10 @@ def _upsert_cached_rfc(entry: entry_mod.Entry, body_sha: str) -> None:
INSERT INTO cached_rfcs
(slug, title, state, rfc_id, repo, proposed_by, proposed_at,
graduated_at, graduated_by, owners_json, arbiters_json, tags_json,
models_json, funder_login, body, body_sha, last_entry_commit_at, updated_at)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, datetime('now'), datetime('now'))
models_json, funder_login, body, body_sha,
unreviewed, reviewed_at, reviewed_by,
last_entry_commit_at, updated_at)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, datetime('now'), datetime('now'))
ON CONFLICT(slug) DO UPDATE SET
title = excluded.title,
state = excluded.state,
@@ -105,6 +107,9 @@ def _upsert_cached_rfc(entry: entry_mod.Entry, body_sha: str) -> None:
funder_login = excluded.funder_login,
body = excluded.body,
body_sha = excluded.body_sha,
unreviewed = excluded.unreviewed,
reviewed_at = excluded.reviewed_at,
reviewed_by = excluded.reviewed_by,
last_entry_commit_at = datetime('now'),
updated_at = datetime('now')
""",
@@ -125,6 +130,9 @@ def _upsert_cached_rfc(entry: entry_mod.Entry, body_sha: str) -> None:
funder_login,
entry.body,
body_sha,
1 if entry.unreviewed else 0,
entry.reviewed_at,
entry.reviewed_by,
),
)