diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-24 11:36:39 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-24 11:36:39 +0000 |
| commit | c31a313ccf781e54fa15942bc882c1b113d3f590 (patch) | |
| tree | 0dec673c40a7cff42651c290b8ded5f6d063a8ae /src/nostr | |
| parent | 5efdf431a1481f6fb7a17190b62588b81c5b1e65 (diff) | |
rename: fetch_repository_data -> fetch_repository_data_{excluding,with}_purgatory
The old name was ambiguous - it wasn't clear whether purgatory was
included or not. The two variants are now explicitly named:
- fetch_repository_data_excluding_purgatory: DB only
- fetch_repository_data_with_purgatory: DB + purgatory overlay
SyncContext trait method also renamed to fetch_repository_data_with_purgatory
to match the free function it delegates to.
Diffstat (limited to 'src/nostr')
| -rw-r--r-- | src/nostr/policy/pr_event.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nostr/policy/pr_event.rs b/src/nostr/policy/pr_event.rs index 072e445..52747a4 100644 --- a/src/nostr/policy/pr_event.rs +++ b/src/nostr/policy/pr_event.rs | |||
| @@ -7,7 +7,7 @@ use nostr_relay_builder::prelude::Event; | |||
| 7 | 7 | ||
| 8 | use super::PolicyContext; | 8 | use super::PolicyContext; |
| 9 | use crate::git; | 9 | use crate::git; |
| 10 | use crate::git::authorization::{collect_authorized_maintainers, fetch_repository_data}; | 10 | use crate::git::authorization::{collect_authorized_maintainers, fetch_repository_data_excluding_purgatory}; |
| 11 | 11 | ||
| 12 | /// Policy for validating PR and PR Update events | 12 | /// Policy for validating PR and PR Update events |
| 13 | #[derive(Clone)] | 13 | #[derive(Clone)] |
| @@ -131,7 +131,7 @@ impl PrEventPolicy { | |||
| 131 | // only be accepted for announcements that have been promoted (validated). | 131 | // only be accepted for announcements that have been promoted (validated). |
| 132 | // If the announcement is still in purgatory, the PR event should also go | 132 | // If the announcement is still in purgatory, the PR event should also go |
| 133 | // to purgatory and wait for the announcement to be promoted. | 133 | // to purgatory and wait for the announcement to be promoted. |
| 134 | let db_repo_data = fetch_repository_data(&self.ctx.database, &identifier).await?; | 134 | let db_repo_data = fetch_repository_data_excluding_purgatory(&self.ctx.database, &identifier).await?; |
| 135 | 135 | ||
| 136 | // Extract owner pubkey from source repo path | 136 | // Extract owner pubkey from source repo path |
| 137 | let owner_pubkey = crate::git::sync::extract_owner_from_repo_path( | 137 | let owner_pubkey = crate::git::sync::extract_owner_from_repo_path( |
| @@ -211,7 +211,7 @@ impl PrEventPolicy { | |||
| 211 | // only be accepted for announcements that have been promoted (validated). | 211 | // only be accepted for announcements that have been promoted (validated). |
| 212 | // If the announcement is still in purgatory, the PR event should also go | 212 | // If the announcement is still in purgatory, the PR event should also go |
| 213 | // to purgatory and wait for the announcement to be promoted. | 213 | // to purgatory and wait for the announcement to be promoted. |
| 214 | let db_repo_data = fetch_repository_data(&self.ctx.database, identifier).await?; | 214 | let db_repo_data = fetch_repository_data_excluding_purgatory(&self.ctx.database, identifier).await?; |
| 215 | 215 | ||
| 216 | // 3. Extract list of maintainers from "a 30617:<maintainer>:<identifier>" tags | 216 | // 3. Extract list of maintainers from "a 30617:<maintainer>:<identifier>" tags |
| 217 | let mut maintainer_pubkeys = std::collections::HashSet::new(); | 217 | let mut maintainer_pubkeys = std::collections::HashSet::new(); |