From fedf5166f0c57db14b9e43747121e4b7845b63dd Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Tue, 20 Aug 2024 06:25:17 +0100 Subject: feat: set proposal branch prefix to `pr/` from `prs/`. whilst plural reflects usage of `heads` and `tags` in git refs, singular is shorter and more reflective of usage of branch prefixes such as `feature/` `fix/` --- src/sub_commands/send.rs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/sub_commands') diff --git a/src/sub_commands/send.rs b/src/sub_commands/send.rs index a005bd7..8369b10 100644 --- a/src/sub_commands/send.rs +++ b/src/sub_commands/send.rs @@ -648,7 +648,7 @@ pub async fn generate_cover_letter_and_patch_events( vec![ Tag::custom( nostr::TagKind::Custom(std::borrow::Cow::Borrowed("branch-name")), - vec![if let Some(branch_name) = branch_name.strip_prefix("prs/") { + vec![if let Some(branch_name) = branch_name.strip_prefix("pr/") { branch_name.to_string() } else { branch_name @@ -691,13 +691,11 @@ pub async fn generate_cover_letter_and_patch_events( && !branch_name.eq("origin/main") && !branch_name.eq("origin/master") { - Some( - if let Some(branch_name) = branch_name.strip_prefix("prs/") { - branch_name.to_string() - } else { - branch_name - }, - ) + Some(if let Some(branch_name) = branch_name.strip_prefix("pr/") { + branch_name.to_string() + } else { + branch_name + }) } else { None } @@ -793,7 +791,7 @@ pub struct CoverLetter { impl CoverLetter { pub fn get_branch_name(&self) -> Result { Ok(format!( - "prs/{}({})", + "pr/{}({})", self.branch_name, &self .event_id -- cgit v1.2.3