commit | 9b3bdbe9fec33e79fa59743ffc88d5394e59c5c7 | [log] [tgz] |
---|---|---|
author | Antonio Barone <syntonyze@gmail.com> | Wed Jul 21 15:29:45 2021 +0200 |
committer | Antonio Barone <syntonyze@gmail.com> | Wed Jul 21 15:38:13 2021 +0200 |
tree | f3067f0e7fb2c31e4ef235933a99f9e50e5a9296 | |
parent | 9a035a3f0114bc46a0d85140d1faf0b0f007f545 [diff] |
Allow to access source of fetch replication events Event listeners that are interested in consuming fetch replication events might need to access which remote the fetch was addressed to. An immediate and concrete case is the replication-status plugin, whose goal is to consume replication events to expose the replication status over REST-API. Bug: Issue 14804 Change-Id: Id0cd0645fd3b44d782cd3c2a574e4e6398c2479a
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchRefReplicatedEvent.java b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchRefReplicatedEvent.java index cad6dfb..8bf257e 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchRefReplicatedEvent.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchRefReplicatedEvent.java
@@ -81,4 +81,8 @@ public String getRefName() { return ref; } + + public String getSourceNode() { + return sourceNode; + } }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchReplicationScheduledEvent.java b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchReplicationScheduledEvent.java index c3d6aca..9a29c86 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchReplicationScheduledEvent.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchReplicationScheduledEvent.java
@@ -40,4 +40,8 @@ public Project.NameKey getProjectNameKey() { return Project.nameKey(project); } + + public String getSourceNode() { + return sourceNode; + } }