feat: Add description tag to the patch
The tag value is the patch subject Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
@@ -27,13 +27,14 @@ use super::{CliOptions, CommandRunner};
|
||||
use crate::error::N34Result;
|
||||
|
||||
|
||||
/// Regular expression for extracting the patch subject.
|
||||
static SUBJECT_RE: LazyLock<Regex> =
|
||||
LazyLock::new(|| Regex::new(r"(?m)^Subject: (.*(?:\n .*)*)").unwrap());
|
||||
|
||||
/// Regular expression for extracting the patch body.
|
||||
static BODY_RE: LazyLock<Regex> =
|
||||
LazyLock::new(|| Regex::new(r"\n\n((?:.|\n)*?)(?:\n--[ -]|\z)").unwrap());
|
||||
|
||||
|
||||
#[derive(Subcommand, Debug)]
|
||||
pub enum PatchSubcommands {
|
||||
/// Send one or more patches to a repository
|
||||
|
||||
@@ -235,6 +235,7 @@ async fn make_patch(
|
||||
// duplicate.
|
||||
let mut safe_dedup_tags = Tags::new();
|
||||
safe_dedup_tags.push(Tag::alt(format!("{PATCH_ALT_PREFIX}{}", patch.subject)));
|
||||
safe_dedup_tags.push(Tag::description(patch.subject));
|
||||
safe_dedup_tags.push(Tag::reference(euc.to_string()));
|
||||
safe_dedup_tags.extend(content_details.into_tags());
|
||||
safe_dedup_tags.extend(
|
||||
|
||||
Reference in New Issue
Block a user