From 28a37393ee62e3b53dad69d58810f72151bd58c2 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 15 Aug 2025 15:17:39 +0100 Subject: feat(remote): list proposals as `refs/pr-by-id/*` This branch name cannot be attacked by brute forcing a shorthand event id like refs/pr/ Result { + let mut events = events.to_owned(); + events.reverse(); + for event in events { + if event + .tags + .iter() + .any(|t| t.as_slice()[0].eq("branch-name") && t.as_slice()[1].eq(branch_name_in_event)) + { + return Ok(event.id); + } + } + bail!("failed to find proposal root with branch-name tag matching title") +} + pub static FEATURE_BRANCH_NAME_1: &str = "feature-example-t"; pub static FEATURE_BRANCH_NAME_2: &str = "feature-example-f"; pub static FEATURE_BRANCH_NAME_3: &str = "feature-example-c"; -- cgit v1.2.3