upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/sub_commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/sub_commands')
-rw-r--r--src/sub_commands/send.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sub_commands/send.rs b/src/sub_commands/send.rs
index 4639b01..189dc53 100644
--- a/src/sub_commands/send.rs
+++ b/src/sub_commands/send.rs
@@ -649,6 +649,10 @@ pub fn generate_cover_letter_and_patch_events(
649 }, 649 },
650 Tag::Reference(format!("{root_commit}")), 650 Tag::Reference(format!("{root_commit}")),
651 Tag::Hashtag("cover-letter".to_string()), 651 Tag::Hashtag("cover-letter".to_string()),
652 Tag::Generic(
653 nostr::TagKind::Custom("alt".to_string()),
654 vec![format!("git patch cover letter: {}", title.clone())],
655 ),
652 ], 656 ],
653 if let Some(event_ref) = root_proposal_id.clone() { 657 if let Some(event_ref) = root_proposal_id.clone() {
654 vec![ 658 vec![
@@ -895,6 +899,7 @@ pub fn patch_supports_commit_ids(event: &nostr::Event) -> bool {
895} 899}
896 900
897#[allow(clippy::too_many_arguments)] 901#[allow(clippy::too_many_arguments)]
902#[allow(clippy::too_many_lines)]
898pub fn generate_patch_event( 903pub fn generate_patch_event(
899 git_repo: &Repo, 904 git_repo: &Repo,
900 root_commit: &Sha1Hash, 905 root_commit: &Sha1Hash,
@@ -912,6 +917,7 @@ pub fn generate_patch_event(
912 .get_commit_parent(commit) 917 .get_commit_parent(commit)
913 .context("failed to get parent commit")?; 918 .context("failed to get parent commit")?;
914 let relay_hint = repo_ref.relays.first().map(nostr::UncheckedUrl::from); 919 let relay_hint = repo_ref.relays.first().map(nostr::UncheckedUrl::from);
920
915 EventBuilder::new( 921 EventBuilder::new(
916 nostr::event::Kind::Custom(PATCH_KIND), 922 nostr::event::Kind::Custom(PATCH_KIND),
917 git_repo 923 git_repo
@@ -937,6 +943,10 @@ pub fn generate_patch_event(
937 // code that makes it into the main branch, assuming 943 // code that makes it into the main branch, assuming
938 // the commit id is correct 944 // the commit id is correct
939 Tag::Reference(commit.to_string()), 945 Tag::Reference(commit.to_string()),
946 Tag::Generic(
947 nostr::TagKind::Custom("alt".to_string()),
948 vec![format!("git patch: {}", git_repo.get_commit_message_summary(commit).unwrap_or_default())],
949 ),
940 ], 950 ],
941 951
942 if let Some(thread_event_id) = thread_event_id { 952 if let Some(thread_event_id) = thread_event_id {