Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
REVIEW: Rename event to match others, past tense
✓ CI success Lorenz Leutgeb committed 9 months ago
commit c7267d4dccd21e0ac29b8d28e72358f49fa4f89c
parent b827880aae9c5ed8b67131d23250bc90f5e282e8
1 passed (1 total) View logs
4 files changed +4 -4
modified crates/radicle-node/src/tests/e2e.rs
@@ -1537,7 +1537,7 @@ fn test_fetch_emits_canonical_ref_update() {
    bob_events
        .wait(
            |e| {
-
                matches!(e, Event::CanonicalRef { refname, .. } if *refname == default_branch)
+
                matches!(e, Event::CanonicalRefUpdated { refname, .. } if *refname == default_branch)
                    .then_some(())
            },
            time::Duration::from_secs(9 * scale as u64),
modified crates/radicle-protocol/src/service.rs
@@ -1202,7 +1202,7 @@ where
                self.emitter.emit_all(
                    canonical
                        .into_iter()
-
                        .map(|(refname, target)| Event::CanonicalRef {
+
                        .map(|(refname, target)| Event::CanonicalRefUpdated {
                            rid,
                            refname,
                            target,
modified crates/radicle/CHANGELOG.md
@@ -20,7 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- `radicle::node::DEFAULT_SOCKET_NAME`, use `radicle::profile::Home::socket`
  instead.
-
- Introduce a node event for canonical reference updates, `Event::CanonicalRef`.
+
- Introduce a node event for canonical reference updates, `Event::CanonicalRefUpdated`.
  Whenever the node fetches new updates, it checks if canonical references can
  be updated. The node has learned how to return these results and emit them as
  node events. This is a breaking change since it adds a new variant the `Event`
modified crates/radicle/src/node/events.rs
@@ -124,7 +124,7 @@ pub enum Event {
    /// The node has uploaded a Git pack file to another node.
    UploadPack(upload_pack::UploadPack),
    /// A canonical reference was updated after a fetch.
-
    CanonicalRef {
+
    CanonicalRefUpdated {
        /// The repository the canonical reference was updated for.
        rid: RepoId,
        /// The reference name of the canonical reference update.