upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/bin/git_remote_nostr/push.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/git_remote_nostr/push.rs')
-rw-r--r--src/bin/git_remote_nostr/push.rs17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/bin/git_remote_nostr/push.rs b/src/bin/git_remote_nostr/push.rs
index c0085bd..15adc13 100644
--- a/src/bin/git_remote_nostr/push.rs
+++ b/src/bin/git_remote_nostr/push.rs
@@ -32,7 +32,7 @@ use ngit::{
32}; 32};
33use nostr::nips::nip10::Marker; 33use nostr::nips::nip10::Marker;
34use nostr_sdk::{ 34use nostr_sdk::{
35 Event, EventBuilder, EventId, Kind, NostrSigner, PublicKey, RelayUrl, Tag, 35 Event, EventBuilder, EventId, Kind, NostrSigner, PublicKey, RelayUrl, Tag, TagStandard,
36 hashes::sha1::Hash as Sha1Hash, 36 hashes::sha1::Hash as Sha1Hash,
37}; 37};
38use repo_ref::RepoRef; 38use repo_ref::RepoRef;
@@ -1312,7 +1312,13 @@ async fn create_merge_status(
1312 repo_ref 1312 repo_ref
1313 .coordinates() 1313 .coordinates()
1314 .iter() 1314 .iter()
1315 .map(|c| Tag::coordinate(c.clone())) 1315 .map(|c| {
1316 Tag::from_standardized(TagStandard::Coordinate {
1317 coordinate: c.coordinate.clone(),
1318 relay_url: c.relays.first().cloned(),
1319 uppercase: false,
1320 })
1321 })
1316 .collect::<Vec<Tag>>(), 1322 .collect::<Vec<Tag>>(),
1317 vec![ 1323 vec![
1318 Tag::from_standardized(nostr::TagStandard::Reference( 1324 Tag::from_standardized(nostr::TagStandard::Reference(
@@ -1358,7 +1364,7 @@ async fn get_proposal_and_revision_root_from_patch(
1358 patch.clone() 1364 patch.clone()
1359 } else { 1365 } else {
1360 let proposal_or_revision_id = EventId::parse( 1366 let proposal_or_revision_id = EventId::parse(
1361 if let Some(t) = patch.tags.iter().find(|t| t.is_root()) { 1367 &if let Some(t) = patch.tags.iter().find(|t| t.is_root()) {
1362 t.clone() 1368 t.clone()
1363 } else if let Some(t) = patch.tags.iter().find(|t| t.is_reply()) { 1369 } else if let Some(t) = patch.tags.iter().find(|t| t.is_reply()) {
1364 t.clone() 1370 t.clone()
@@ -1389,13 +1395,12 @@ async fn get_proposal_and_revision_root_from_patch(
1389 { 1395 {
1390 Ok(( 1396 Ok((
1391 EventId::parse( 1397 EventId::parse(
1392 proposal_or_revision 1398 &proposal_or_revision
1393 .tags 1399 .tags
1394 .iter() 1400 .iter()
1395 .find(|t| t.is_reply()) 1401 .find(|t| t.is_reply())
1396 .unwrap() 1402 .unwrap()
1397 .as_slice()[1] 1403 .as_slice()[1],
1398 .clone(),
1399 )?, 1404 )?,
1400 Some(proposal_or_revision.id), 1405 Some(proposal_or_revision.id),
1401 )) 1406 ))