diff options
Diffstat (limited to 'src/sub_commands/push.rs')
| -rw-r--r-- | src/sub_commands/push.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/sub_commands/push.rs b/src/sub_commands/push.rs index 3c471c0..9e3e041 100644 --- a/src/sub_commands/push.rs +++ b/src/sub_commands/push.rs | |||
| @@ -13,10 +13,13 @@ use crate::{ | |||
| 13 | sub_commands::{ | 13 | sub_commands::{ |
| 14 | self, | 14 | self, |
| 15 | list::{ | 15 | list::{ |
| 16 | find_commits_for_proposal_root_events, find_proposal_events, get_commit_id_from_patch, | 16 | find_commits_for_proposal_root_events, find_proposal_and_status_events, |
| 17 | get_most_recent_patch_with_ancestors, tag_value, | 17 | get_commit_id_from_patch, get_most_recent_patch_with_ancestors, tag_value, |
| 18 | }, | ||
| 19 | send::{ | ||
| 20 | event_is_revision_root, event_to_cover_letter, generate_patch_event, send_events, | ||
| 21 | PATCH_KIND, | ||
| 18 | }, | 22 | }, |
| 19 | send::{event_is_revision_root, event_to_cover_letter, generate_patch_event, send_events}, | ||
| 20 | }, | 23 | }, |
| 21 | Cli, | 24 | Cli, |
| 22 | }; | 25 | }; |
| @@ -207,13 +210,13 @@ pub async fn fetch_proposal_root_and_most_recent_patch_chain( | |||
| 207 | println!("finding proposal root event..."); | 210 | println!("finding proposal root event..."); |
| 208 | 211 | ||
| 209 | let proposal_events_and_revisions: Vec<nostr::Event> = | 212 | let proposal_events_and_revisions: Vec<nostr::Event> = |
| 210 | find_proposal_events(client, repo_ref, &root_commit.to_string()) | 213 | find_proposal_and_status_events(client, repo_ref, &root_commit.to_string()) |
| 211 | .await | 214 | .await |
| 212 | .context("cannot get proposal events for repo")?; | 215 | .context("cannot get proposal events for repo")?; |
| 213 | 216 | ||
| 214 | let proposal_events: Vec<&nostr::Event> = proposal_events_and_revisions | 217 | let proposal_events: Vec<&nostr::Event> = proposal_events_and_revisions |
| 215 | .iter() | 218 | .iter() |
| 216 | .filter(|e| !event_is_revision_root(e)) | 219 | .filter(|e| !event_is_revision_root(e) && e.kind().as_u16().eq(&PATCH_KIND)) |
| 217 | .collect::<Vec<&nostr::Event>>(); | 220 | .collect::<Vec<&nostr::Event>>(); |
| 218 | 221 | ||
| 219 | let proposal_root_event: &nostr::Event = proposal_events | 222 | let proposal_root_event: &nostr::Event = proposal_events |