upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/nostr/policy/pr_event.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-02-26 15:42:09 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-02-26 15:42:09 +0000
commit9d86cf15f0275ffeee4519bd054e3b61dc8992ac (patch)
tree65b5d5ffb2a11b5ecd05d01e63fb5a4a0f8b6e06 /src/nostr/policy/pr_event.rs
parenta2ecfc5a63311570f0f90c7ee40117e289639cb8 (diff)
chore: apply cargo fmt and fix clippy warnings
Fix pre-existing clippy lints: - &PathBuf -> &Path in audit_cleanup.rs - too_many_arguments on process_newly_available_git_data, process_purgatory_announcements, and HttpService::new - clone_on_copy for PublicKey (Copy type) in purgatory cleanup loop
Diffstat (limited to 'src/nostr/policy/pr_event.rs')
-rw-r--r--src/nostr/policy/pr_event.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nostr/policy/pr_event.rs b/src/nostr/policy/pr_event.rs
index 52747a4..e4a64b8 100644
--- a/src/nostr/policy/pr_event.rs
+++ b/src/nostr/policy/pr_event.rs
@@ -7,7 +7,9 @@ use nostr_relay_builder::prelude::Event;
7 7
8use super::PolicyContext; 8use super::PolicyContext;
9use crate::git; 9use crate::git;
10use crate::git::authorization::{collect_authorized_maintainers, fetch_repository_data_excluding_purgatory}; 10use crate::git::authorization::{
11 collect_authorized_maintainers, fetch_repository_data_excluding_purgatory,
12};
11 13
12/// Policy for validating PR and PR Update events 14/// Policy for validating PR and PR Update events
13#[derive(Clone)] 15#[derive(Clone)]
@@ -131,7 +133,8 @@ impl PrEventPolicy {
131 // only be accepted for announcements that have been promoted (validated). 133 // only be accepted for announcements that have been promoted (validated).
132 // If the announcement is still in purgatory, the PR event should also go 134 // If the announcement is still in purgatory, the PR event should also go
133 // to purgatory and wait for the announcement to be promoted. 135 // to purgatory and wait for the announcement to be promoted.
134 let db_repo_data = fetch_repository_data_excluding_purgatory(&self.ctx.database, &identifier).await?; 136 let db_repo_data =
137 fetch_repository_data_excluding_purgatory(&self.ctx.database, &identifier).await?;
135 138
136 // Extract owner pubkey from source repo path 139 // Extract owner pubkey from source repo path
137 let owner_pubkey = crate::git::sync::extract_owner_from_repo_path( 140 let owner_pubkey = crate::git::sync::extract_owner_from_repo_path(
@@ -211,7 +214,8 @@ impl PrEventPolicy {
211 // only be accepted for announcements that have been promoted (validated). 214 // only be accepted for announcements that have been promoted (validated).
212 // If the announcement is still in purgatory, the PR event should also go 215 // If the announcement is still in purgatory, the PR event should also go
213 // to purgatory and wait for the announcement to be promoted. 216 // to purgatory and wait for the announcement to be promoted.
214 let db_repo_data = fetch_repository_data_excluding_purgatory(&self.ctx.database, identifier).await?; 217 let db_repo_data =
218 fetch_repository_data_excluding_purgatory(&self.ctx.database, identifier).await?;
215 219
216 // 3. Extract list of maintainers from "a 30617:<maintainer>:<identifier>" tags 220 // 3. Extract list of maintainers from "a 30617:<maintainer>:<identifier>" tags
217 let mut maintainer_pubkeys = std::collections::HashSet::new(); 221 let mut maintainer_pubkeys = std::collections::HashSet::new();