Compare commits
2 Commits
main
...
probablyco
| Author | SHA1 | Date | |
|---|---|---|---|
| 1c139602de | |||
| 618bd23436 |
|
|
@ -1,4 +1,4 @@
|
|||
# Spike
|
||||
# 🌵 Spike
|
||||
|
||||
Discord-Gitea bridge bot. When someone opens a PR or leaves a comment on [git.nose.space](https://git.nose.space), Spike posts it to a Discord channel. When someone replies in the Discord thread, Spike posts it back to Gitea.
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ mkdirSync(logsDir, { recursive: true })
|
|||
|
||||
function createLogFile(): string {
|
||||
const timestamp = new Date().toISOString().replace(/[:.]/g, "-")
|
||||
return `${logsDir}/${releaseSha}_${timestamp}.jsonl`
|
||||
return `${logsDir}/${timestamp}_${releaseSha}.jsonl`
|
||||
}
|
||||
|
||||
export function listLogFiles(): string[] {
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ function Sidebar({ files, selectedFile }: { files: string[]; selectedFile?: stri
|
|||
// Group files by sha, sorted by most recent file in each group
|
||||
const grouped: Record<string, string[]> = {}
|
||||
for (const file of files) {
|
||||
const sha = file.split("_")[0] || "unknown"
|
||||
const sha = file.replace(".jsonl", "").split("_").pop() || "unknown"
|
||||
const list = grouped[sha] || (grouped[sha] = [])
|
||||
list.push(file)
|
||||
}
|
||||
|
|
@ -130,8 +130,8 @@ function Sidebar({ files, selectedFile }: { files: string[]; selectedFile?: stri
|
|||
<div style="padding: 4px 16px; color: #6b7280; font-size: 11px; font-family: monospace">{sha}</div>
|
||||
{shaFiles.map((file) => {
|
||||
const isSelected = file === selectedFile
|
||||
// Parse ISO timestamp back from filename: sha_2026-03-10T02-56-59-938Z.jsonl
|
||||
const isoStr = file.replace(/^[^_]+_/, "").replace(".jsonl", "").replace(/T(\d{2})-(\d{2})-(\d{2})-(\d+)Z/, "T$1:$2:$3.$4Z")
|
||||
// Parse ISO timestamp back from filename: 2026-03-10T02-56-59-938Z_sha.jsonl
|
||||
const isoStr = file.replace(/_[^_]+\.jsonl$/, "").replace(/T(\d{2})-(\d{2})-(\d{2})-(\d+)Z/, "T$1:$2:$3.$4Z")
|
||||
const bg = isSelected ? "#2a2a2a" : "transparent"
|
||||
return (
|
||||
<a
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user