Skip to content

Commit

Permalink
Use RepositoryEvent.newDiscoveryEvent(..) and pass the nickname
Browse files Browse the repository at this point in the history
Currently even if a reference would define a nickname it is not passed
by the repository event resulting in an updatesite to have an empty
name.

This uses the RepositoryEvent.newDiscoveryEvent(...) method to pass the
nickname is present.
  • Loading branch information
laeubi committed May 11, 2024
1 parent 9cd83bd commit 36e305b
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,14 @@ public void initialize(RepositoryState state) {
*/
public void publishRepositoryReferences() {
IProvisioningEventBus bus = getProvisioningAgent().getService(IProvisioningEventBus.class);
if (bus == null)
if (bus == null) {
return;

}
List<IRepositoryReference> repositoriesSnapshot = createRepositoriesSnapshot();
for (IRepositoryReference reference : repositoriesSnapshot) {
bus.publishEvent(new RepositoryEvent(reference.getLocation(), reference.getType(),
RepositoryEvent.DISCOVERED, reference.isEnabled()));
RepositoryEvent event = RepositoryEvent.newDiscoveryEvent(reference.getLocation(), reference.getNickname(),
reference.getType(), reference.isEnabled());
bus.publishEvent(event);
}
}

Expand Down

0 comments on commit 36e305b

Please sign in to comment.