From c7c6e8ba4bf3309aed92a620b2435370dae0d6ed Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 17 Oct 2025 13:14:34 +0100 Subject: fix(fetch): surpress some warnings for some users only the maintainers and author of a poorly formatted proposal need to know it was submitted but cant be created as a PR branch --- src/bin/git_remote_nostr/list.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/bin/git_remote_nostr/list.rs') diff --git a/src/bin/git_remote_nostr/list.rs b/src/bin/git_remote_nostr/list.rs index af71674..b3ef2f6 100644 --- a/src/bin/git_remote_nostr/list.rs +++ b/src/bin/git_remote_nostr/list.rs @@ -198,12 +198,16 @@ async fn get_open_and_draft_proposals_state( state.insert(format!("refs/heads/{branch_name}"), tip); } Err(error) => { - let _ = term.write_line( - format!( - "WARNING: failed to fetch branch {branch_name} error: {error}" - ) - .as_str(), - ); + if let Ok(Some(public_key)) = get_curent_user(git_repo) { + if repo_ref.maintainers.contains(&public_key) + || events_to_apply.iter().any(|e| e.pubkey.eq(&public_key)) + { + term.write_line( + format!("WARNING (only shown to maintainers or author): failed to fetch branch {branch_name}, error: {error}",) + .as_str(), + )?; + } + } } } } -- cgit v1.2.3