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:
Awiteb
2025-06-04 22:09:49 +00:00
parent 494cced9cb
commit 812a06a276
3 changed files with 5 additions and 1 deletions

View File

@@ -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

View File

@@ -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(