Page MenuHomePhabricator

T7651: Created herald.queryrules Conduit API method.
Needs RevisionPublic

Authored by Pawka on Mar 24 2015, 9:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jul 21, 2:05 PM
Unknown Object (File)
Wed, Jul 17, 8:05 AM
Unknown Object (File)
Sat, Jul 13, 4:24 AM
Unknown Object (File)
Thu, Jul 11, 7:31 AM
Unknown Object (File)
Mon, Jul 8, 1:00 AM
Unknown Object (File)
Thu, Jul 4, 1:19 PM
Unknown Object (File)
Thu, Jul 4, 10:20 AM
Unknown Object (File)
Thu, Jul 4, 8:18 AM

Details

Summary

Created herald.queryrules Conduit API method to search Herald rules.

Test Plan

Open yourphabricator.com/conduit/method/herald.queryrules/ and perform search with different parameters.

Diff Detail

Repository
rP Phabricator
Branch
herald_queryrules
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 4955
Build 4973: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

Pawka retitled this revision from to T7651: Created herald.queryrules Conduit API method..
Pawka updated this object.
Pawka edited the test plan for this revision. (Show Details)
Pawka added a reviewer: epriestley.
Pawka edited edge metadata.
protected function buildConditionsInfoDictionaries(array $conditions) {
  assert_instances_of($conditions, 'HeraldCondition');

  $result = array();

  if (!empty($conditions)) {
    foreach ($conditions as $cond) {
      $result[$cond->getID()] = array(
        'id'             => $cond->getID(),
        'fieldName'      => $cond->getFieldName(),
        'fieldCondition' => $cond->getFieldCondition(),
        'value'          => $cond->getValue(),
      );
    }
  }

  return $result;
}

protected function buildActionsInfoDictionaries(array $actions) {
  assert_instances_of($actions, 'HeraldAction');

  $result = array();

  if (!empty($actions)) {
    foreach ($actions as $action) {
      $result[$action->getID()] = array(
        'id'     => $action->getID(),
        'action' => $action->getAction(),
        'target' => $action->getTarget(),
      );
    }
  }

  return $result;
}

}

epriestley edited edge metadata.

Per T7651, I don't want to bring this upstream now. Particularly, it should wait for T7715 and rebuild on top of that, and it seems questionable even then.

This revision now requires changes to proceed.May 19 2015, 3:20 PM