my own status page
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

bug: fix duplicate github comment fetching

+4 -4
+4 -4
src/github.ts
··· 153 153 await updateIncident(db, incident.id, { status: "resolved", resolved_at: now }); 154 154 await addIncidentUpdate(db, incident.id, "resolved", resolveMsg); 155 155 156 - // Track sync position 156 + // Track sync position (bump by 1s since GitHub's `since` is inclusive) 157 157 if (comments.length > 0) { 158 - const latest = comments[comments.length - 1].created_at; 158 + const latest = new Date(new Date(comments[comments.length - 1].created_at).getTime() + 1000).toISOString(); 159 159 await kv.put(kvKey, latest, { expirationTtl: 86400 * 7 }); 160 160 } 161 161 continue; ··· 173 173 await addIncidentUpdate(db, incident.id, incident.status, comment.body); 174 174 } 175 175 176 - // Track last comment time so we don't re-import 176 + // Track last comment time so we don't re-import (bump by 1s since GitHub's `since` is inclusive) 177 177 if (comments.length > 0) { 178 - const latest = comments[comments.length - 1].created_at; 178 + const latest = new Date(new Date(comments[comments.length - 1].created_at).getTime() + 1000).toISOString(); 179 179 await kv.put(kvKey, latest, { expirationTtl: 86400 * 7 }); 180 180 } 181 181 } catch (_) {} // best effort, don't block other syncs