Skip to main content

append_reply

Function append_reply 

Source
pub fn append_reply(
    db: &Db,
    project: &str,
    branch: &str,
    id: &str,
    author_label: &str,
    text: &str,
    at: &str,
) -> Result<ReviewStatus>
Expand description

Append an agent reply to the thread id in (project, branch): push a ReviewComment authored by Agent { label: author_label }, flip an Open thread to Addressed (a Resolved / Outdated / already-Addressed thread keeps its state), bump updated_at, and persist in one write transaction. Returns the thread’s status after the append. Errors when no thread carries id, so a stale comment_id surfaces rather than silently no-op’ing. An empty at is stamped with the current instant.