upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/bin/git_remote_nostr/list.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-10-17 13:14:34 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2025-10-17 13:14:34 +0100
commitc7c6e8ba4bf3309aed92a620b2435370dae0d6ed (patch)
tree3ceaa8e5a0356e85e08bca935af5542bcd98b5e3 /src/bin/git_remote_nostr/list.rs
parentb126e5b7acfce55bd101b06cb5baf7f251cd0fda (diff)
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
Diffstat (limited to 'src/bin/git_remote_nostr/list.rs')
-rw-r--r--src/bin/git_remote_nostr/list.rs16
1 files changed, 10 insertions, 6 deletions
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(
198 state.insert(format!("refs/heads/{branch_name}"), tip); 198 state.insert(format!("refs/heads/{branch_name}"), tip);
199 } 199 }
200 Err(error) => { 200 Err(error) => {
201 let _ = term.write_line( 201 if let Ok(Some(public_key)) = get_curent_user(git_repo) {
202 format!( 202 if repo_ref.maintainers.contains(&public_key)
203 "WARNING: failed to fetch branch {branch_name} error: {error}" 203 || events_to_apply.iter().any(|e| e.pubkey.eq(&public_key))
204 ) 204 {
205 .as_str(), 205 term.write_line(
206 ); 206 format!("WARNING (only shown to maintainers or author): failed to fetch branch {branch_name}, error: {error}",)
207 .as_str(),
208 )?;
209 }
210 }
207 } 211 }
208 } 212 }
209 } 213 }