upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-02-27 16:11:36 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-02-27 16:11:36 +0000
commitba87592c87eb964b1c3a2d17543e38b9b70ed1a6 (patch)
treeb157a0c4dae2348c6a93440d0270935cf69a45dc
parent71cd982e5ca3e6f60fdf33fd41d0db3eabdbf39f (diff)
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/<branch>).
-rw-r--r--CHANGELOG.md1
-rw-r--r--src/lib/client.rs7
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
13- git server push option passthrough, enabling `-o secret-scanning.skip` for grasp servers 13- git server push option passthrough, enabling `-o secret-scanning.skip` for grasp servers
14- `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` 14- `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`
15- 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 15- 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
16- `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
16- `FetchReport` now tracks and displays a count of kind-5 deletion events received (e.g. `"1 deletion"` in the fetch summary) 17- `FetchReport` now tracks and displays a count of kind-5 deletion events received (e.g. `"1 deletion"` in the fetch summary)
17- `ngit account login` nostrconnect flow now shows current signer relays and allows changing them 18- `ngit account login` nostrconnect flow now shows current signer relays and allows changing them
18- `ngit account login --bunker-url` - specify bunker URL for non-interactive nostrconnect login 19- `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(
1645 git_repo_path, 1645 git_repo_path,
1646 vec![ 1646 vec![
1647 nostr::Filter::default() 1647 nostr::Filter::default()
1648 .kinds(vec![Kind::GitPatch]) 1648 .kinds(vec![Kind::GitPatch, KIND_PULL_REQUEST])
1649 .custom_tags( 1649 .custom_tags(
1650 SingleLetterTag::lowercase(nostr_sdk::Alphabet::A), 1650 SingleLetterTag::lowercase(nostr_sdk::Alphabet::A),
1651 repo_coordinates_without_relays 1651 repo_coordinates_without_relays
@@ -1657,7 +1657,10 @@ async fn create_relays_request(
1657 ) 1657 )
1658 .await? 1658 .await?
1659 { 1659 {
1660 if event_is_patch_set_root(event) || event_is_revision_root(event) { 1660 if event_is_patch_set_root(event)
1661 || event_is_revision_root(event)
1662 || event.kind.eq(&KIND_PULL_REQUEST)
1663 {
1661 proposals.insert(event.id); 1664 proposals.insert(event.id);
1662 contributors.insert(event.pubkey); 1665 contributors.insert(event.pubkey);
1663 } 1666 }