HomePhabricator

Fix a Herald issue where testing commits against rules with revision-related…

Description

Fix a Herald issue where testing commits against rules with revision-related conditions would fail

Summary:
Fixes T11610. Clean up some sketchy old code from long ago.

If you had rules that use conditions like "Accepted revision exists" and ran them in the test console, we'd never load the "CommitData" and fatal.

Instead, load CommitData in newTestAdapter() and generally make these pathways a little more modern.

Test Plan:

  • Wrote an "Accepted Revision Exists" rule.
  • Ran a commit in the test console.
  • Before patch, got fatal from T11610.
  • After patch, got clean test result.
  • Also pushed a commit and reviewed the transcript to make sure the rule ran properly.

Reviewers: joshuaspence, chad

Reviewed By: chad

Maniphest Tasks: T11610

Differential Revision: https://secure.phabricator.com/D16522