diff options
Diffstat (limited to 'src/sub_commands/pull.rs')
| -rw-r--r-- | src/sub_commands/pull.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sub_commands/pull.rs b/src/sub_commands/pull.rs index c426510..f3ae81f 100644 --- a/src/sub_commands/pull.rs +++ b/src/sub_commands/pull.rs | |||
| @@ -8,6 +8,7 @@ use crate::{ | |||
| 8 | client::Connect, | 8 | client::Connect, |
| 9 | git::{Repo, RepoActions}, | 9 | git::{Repo, RepoActions}, |
| 10 | repo_ref, | 10 | repo_ref, |
| 11 | repo_ref::REPO_REF_KIND, | ||
| 11 | sub_commands::prs::{ | 12 | sub_commands::prs::{ |
| 12 | create::{PATCH_KIND, PR_KIND}, | 13 | create::{PATCH_KIND, PR_KIND}, |
| 13 | list::{get_most_recent_patch_with_ancestors, tag_value}, | 14 | list::{get_most_recent_patch_with_ancestors, tag_value}, |
| @@ -53,7 +54,12 @@ pub async fn launch() -> Result<()> { | |||
| 53 | vec![ | 54 | vec![ |
| 54 | nostr::Filter::default() | 55 | nostr::Filter::default() |
| 55 | .kind(nostr::Kind::Custom(PR_KIND)) | 56 | .kind(nostr::Kind::Custom(PR_KIND)) |
| 56 | .reference(format!("r-{root_commit}")), | 57 | .identifiers( |
| 58 | repo_ref | ||
| 59 | .maintainers | ||
| 60 | .iter() | ||
| 61 | .map(|m| format!("{REPO_REF_KIND}:{m}:{}", repo_ref.identifier)), | ||
| 62 | ), | ||
| 57 | ], | 63 | ], |
| 58 | ) | 64 | ) |
| 59 | .await? | 65 | .await? |
| @@ -62,7 +68,7 @@ pub async fn launch() -> Result<()> { | |||
| 62 | e.kind.as_u64() == PR_KIND | 68 | e.kind.as_u64() == PR_KIND |
| 63 | && e.tags | 69 | && e.tags |
| 64 | .iter() | 70 | .iter() |
| 65 | .any(|t| t.as_vec().len() > 1 && t.as_vec()[1].eq(&format!("r-{root_commit}"))) | 71 | .any(|t| t.as_vec().len() > 1 && t.as_vec()[1].eq(&format!("{root_commit}"))) |
| 66 | && tag_value(e, "branch-name") | 72 | && tag_value(e, "branch-name") |
| 67 | .unwrap_or_default() | 73 | .unwrap_or_default() |
| 68 | .eq(&branch_name) | 74 | .eq(&branch_name) |