upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/lib/git_events.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/git_events.rs')
-rw-r--r--src/lib/git_events.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/lib/git_events.rs b/src/lib/git_events.rs
index 2adc205..29c4cf2 100644
--- a/src/lib/git_events.rs
+++ b/src/lib/git_events.rs
@@ -1,12 +1,11 @@
1use std::str::FromStr; 1use std::{str::FromStr, sync::Arc};
2 2
3use anyhow::{bail, Context, Result}; 3use anyhow::{bail, Context, Result};
4use nostr::nips::{nip01::Coordinate, nip10::Marker, nip19::Nip19}; 4use nostr::nips::{nip01::Coordinate, nip10::Marker, nip19::Nip19};
5use nostr_sdk::{ 5use nostr_sdk::{
6 hashes::sha1::Hash as Sha1Hash, Event, EventBuilder, EventId, FromBech32, Kind, PublicKey, Tag, 6 hashes::sha1::Hash as Sha1Hash, Event, EventBuilder, EventId, FromBech32, Kind, NostrSigner,
7 TagKind, TagStandard, UncheckedUrl, 7 PublicKey, Tag, TagKind, TagStandard, UncheckedUrl,
8}; 8};
9use nostr_signer::NostrSigner;
10 9
11use crate::{ 10use crate::{
12 cli_interactor::{Interactor, InteractorPrompt, PromptInputParms}, 11 cli_interactor::{Interactor, InteractorPrompt, PromptInputParms},
@@ -86,7 +85,7 @@ pub async fn generate_patch_event(
86 root_commit: &Sha1Hash, 85 root_commit: &Sha1Hash,
87 commit: &Sha1Hash, 86 commit: &Sha1Hash,
88 thread_event_id: Option<nostr::EventId>, 87 thread_event_id: Option<nostr::EventId>,
89 signer: &nostr_sdk::NostrSigner, 88 signer: &Arc<dyn NostrSigner>,
90 repo_ref: &RepoRef, 89 repo_ref: &RepoRef,
91 parent_patch_event_id: Option<nostr::EventId>, 90 parent_patch_event_id: Option<nostr::EventId>,
92 series_count: Option<(u64, u64)>, 91 series_count: Option<(u64, u64)>,
@@ -309,7 +308,7 @@ pub async fn generate_cover_letter_and_patch_events(
309 cover_letter_title_description: Option<(String, String)>, 308 cover_letter_title_description: Option<(String, String)>,
310 git_repo: &Repo, 309 git_repo: &Repo,
311 commits: &[Sha1Hash], 310 commits: &[Sha1Hash],
312 signer: &NostrSigner, 311 signer: &Arc<dyn NostrSigner>,
313 repo_ref: &RepoRef, 312 repo_ref: &RepoRef,
314 root_proposal_id: &Option<String>, 313 root_proposal_id: &Option<String>,
315 mentions: &[nostr::Tag], 314 mentions: &[nostr::Tag],
@@ -624,7 +623,7 @@ mod tests {
624 Tag::hashtag("root"), 623 Tag::hashtag("root"),
625 ], 624 ],
626 ) 625 )
627 .to_event(&nostr::Keys::generate())?) 626 .sign_with_keys(&nostr::Keys::generate())?)
628 } 627 }
629 628
630 #[test] 629 #[test]