From b67376ff54abeab31422921ba5f4883d5d3dccdb Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Tue, 23 Jul 2024 16:36:06 +0100 Subject: feat(list): unique proposal branch names to prevent accidental name conflicts. also moved to prs/* namespace `pull` and `push` integration tests are intermitantly failing to end at least for `push` they work when run individually but not when run together --- src/sub_commands/push.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/sub_commands/push.rs') diff --git a/src/sub_commands/push.rs b/src/sub_commands/push.rs index d05158f..9af8b40 100644 --- a/src/sub_commands/push.rs +++ b/src/sub_commands/push.rs @@ -16,7 +16,7 @@ use crate::{ get_most_recent_patch_with_ancestors, get_proposals_and_revisions_from_cache, tag_value, }, - send::{event_to_cover_letter, generate_patch_event, send_events}, + send::{event_is_revision_root, event_to_cover_letter, generate_patch_event, send_events}, }, Cli, }; @@ -66,7 +66,11 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { get_proposals_and_revisions_from_cache(git_repo_path, repo_ref.coordinates()) .await? .iter() - .find(|e| event_to_cover_letter(e).is_ok_and(|cl| cl.branch_name.eq(&branch_name))) + .find(|e| { + event_to_cover_letter(e) + .is_ok_and(|cl| cl.get_branch_name().is_ok_and(|s| s.eq(&branch_name))) + && !event_is_revision_root(e) + }) .context("cannot find proposal that matches the current branch name")? .clone(); -- cgit v1.2.3