fix(#1940): carry pr_number on the live approval_added event

This commit is contained in:
damocles 2026-06-23 15:11:28 +02:00 committed by mara
commit 4c53898382
4 changed files with 74 additions and 31 deletions

View file

@ -76,6 +76,13 @@ pub enum DashboardEvent {
sha_short: Option<String>,
diff: Option<String>,
description: Option<String>,
/// Forge PR number, for `merge_config_pr` approvals only — lets
/// the live `applyApprovalAdded` path build the "review PR on
/// forge" link without waiting for a cold `/api/state` refresh
/// (mirrors `ApprovalView::pr_number`). `None` for every other
/// kind.
#[serde(skip_serializing_if = "Option::is_none")]
pr_number: Option<u64>,
},
/// A pending approval transitioned to a terminal state
/// (approved / denied / failed). Clients move the row out of the
@ -346,6 +353,7 @@ mod tests {
sha_short: None,
diff: None,
description: None,
pr_number: None,
},
DashboardEvent::ApprovalResolved {
seq: 1,