From ba87592c87eb964b1c3a2d17543e38b9b70ed1a6 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 27 Feb 2026 16:11:36 +0000 Subject: fix: include KIND_PULL_REQUEST IDs in proposal_ids for fetch filters kind-5 deletion events that only #e-tag a PR Kind event (kind 1618) were never fetched because proposal_ids was built from Kind::GitPatch events only. The deleted PR event remained in the local cache and continued to appear as a remote ref (refs/heads/pr/). --- CHANGELOG.md | 1 + src/lib/client.rs | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f91429b..82b91db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - git server push option passthrough, enabling `-o secret-scanning.skip` for grasp servers - `ngit sync` now publishes the current state event to grasp server relays that are missing it or have a stale version before attempting git pushes, preventing rejections; per-relay state visibility is captured during the nostr fetch and surfaced via `FetchReport::state_per_relay` - Fetch filters now request kind-5 deletion events for cached state and repo announcement events by `#e` tag (NIP-09), in addition to the existing `#a`-tagged filter; ensures deletions of these events are received even from clients that do not embed a repo coordinate in their deletion event +- `KIND_PULL_REQUEST` (kind 1618) event IDs are now included in `proposal_ids` when building fetch filters, so kind-5 deletion events that only `#e`-tag a PR Kind event (without an `#a` repo coordinate tag) are fetched and applied; previously deleted PR Kind events remained in the local cache and continued to appear as remote refs - `FetchReport` now tracks and displays a count of kind-5 deletion events received (e.g. `"1 deletion"` in the fetch summary) - `ngit account login` nostrconnect flow now shows current signer relays and allows changing them - `ngit account login --bunker-url` - specify bunker URL for non-interactive nostrconnect login diff --git a/src/lib/client.rs b/src/lib/client.rs index c1bf751..41e5379 100644 --- a/src/lib/client.rs +++ b/src/lib/client.rs @@ -1645,7 +1645,7 @@ async fn create_relays_request( git_repo_path, vec![ nostr::Filter::default() - .kinds(vec![Kind::GitPatch]) + .kinds(vec![Kind::GitPatch, KIND_PULL_REQUEST]) .custom_tags( SingleLetterTag::lowercase(nostr_sdk::Alphabet::A), repo_coordinates_without_relays @@ -1657,7 +1657,10 @@ async fn create_relays_request( ) .await? { - if event_is_patch_set_root(event) || event_is_revision_root(event) { + if event_is_patch_set_root(event) + || event_is_revision_root(event) + || event.kind.eq(&KIND_PULL_REQUEST) + { proposals.insert(event.id); contributors.insert(event.pubkey); } -- cgit v1.2.3