Dashboard › publish › Distillation
d7023ed0-6dbf-4d8c-bca6-793fc74b036a["lore_tm_v1_idccifz2n4d_IBp4NUVcOlAqZJYn8kvDZi8IHs5ZDks"]
Date: Aug 28, 2026
src/modules/approval-attestation.js defines ATTESTATION_PREFIX = "<!-- publish-approval " and ATTESTATION_SUFFIX = " -->".createApprovalAttestation({ actor, eventId, title }) serializes { actor, eventId: String(eventId), title } as base64url JSON and returns it wrapped in the <!-- publish-approval ... --> HTML-comment format.parseApprovalAttestation(body) locates the first attestation prefix/suffix, base64url-decodes and JSON-parses its content, and returns null for absent/malformed content or unless actor, eventId, and title are all strings.compareEventIds(left, right) strips leading zeroes (normalizing an all-zero ID to "0"), rejects non-decimal IDs with throw new Error("Invalid issue event ID"), then compares IDs by normalized string length and localeCompare, avoiding numeric conversion.currentAcceptedEvent(events) filters for labeled events whose label name is accepted, whose id is a string or number, and whose actor.login exists; it selects the greatest event ID using compareEventIds() and returns { actor: event.actor.login, eventId: String(event.id) }, otherwise null, including when event-ID comparison throws.hasApprovalAttestation({ comments, event, title, attestationAuthor }) accepts an attestation only if a comment author exactly equals attestationAuthor and its parsed { actor, eventId, title } exactly matches event.actor, event.eventId, and the current title.src/modules/approval-attestation.js exports compareEventIds, createApprovalAttestation, currentAcceptedEvent, hasApprovalAttestation, and parseApprovalAttestation.