Commits

Sebastian Sdorra  committed 313ebd2

send RepositoryHookEvents to new event system

  • Participants
  • Parent commits 30cd797

Comments (0)

Files changed (1)

File scm-core/src/main/java/sonia/scm/repository/AbstractRepositoryManager.java

   }
 
   /**
-   * Method description
+   * Sends a {@link RepositoryHookEvent} to each registered
+   * {@link RepositoryHook} and sends the {@link RepositoryHookEvent} to
+   * the {@link ScmEventBus}.
    *
    *
-   * @param repository
-   * @param event
+   * @param repository changed repository
+   * @param event event to be fired
    */
   @Override
   public void fireHookEvent(Repository repository, RepositoryHookEvent event)
     AssertUtil.assertIsNotNull(event.getType());
     event.setRepository(repository);
 
+    // post to event system
+    ScmEventBus.getInstance().post(event);
+
     List<RepositoryHook> hooks = hookMap.get(event.getType());
 
     if (Util.isNotEmpty(hooks))