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
F13282917: D12140.diff
Sun, Jun 2, 12:36 PM
F13268944: D12140.diff
Wed, May 29, 5:34 AM
F13257244: D12140.id.diff
Sat, May 25, 9:53 PM
F13252258: D12140.diff
Sat, May 25, 1:13 AM
F13235474: D12140.diff
Tue, May 21, 5:29 AM
F13179660: D12140.diff
Wed, May 8, 9:21 PM
Unknown Object (File)
May 4 2024, 6:56 PM
Unknown Object (File)
May 1 2024, 12:24 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