1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02:00

Adding explicitly set ircbot notifications

Summary:
This adds a new configuration setting:

  "notification.actions" : [
    "commit",
    "abandon",
    "actions"
  ]

if not set, displays all actions, if is set, display only what is set to display

Test Plan: add the notification.actions settings and set accordingly

Reviewers: epriestley, zeeg

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1820
This commit is contained in:
Korvin Szanto 2012-03-07 18:46:05 -08:00
parent 8b304870c4
commit d7fcbd7d39

View file

@ -30,6 +30,7 @@ class PhabricatorIRCDifferentialNotificationHandler
public function runBackgroundTasks() {
$iterator = new PhabricatorTimelineIterator('ircdiffx', array('difx'));
$show = $this->getConfig('notification.actions');
if (!$this->skippedOldEvents) {
// Since we only want to post notifications about new events, skip
@ -44,7 +45,7 @@ class PhabricatorIRCDifferentialNotificationHandler
foreach ($iterator as $event) {
$data = $event->getData();
if (!$data) {
if (!$data || ($show !== null && !in_array($data['action'], $show))) {
continue;
}