| Defined | src/docs/userguide/herald.diviner:1 |
|---|---|
| Group | Application User Guides |
Use Herald to get notified of changes you care about.
Herald allows you to write processing rules that take effect when objects (such as Differential revisions and commits) are created or updated. For instance, you might want to get notified every time someone sends out a revision that affects some file you're interested in, even if they didn't add you as a reviewer.
Herald is less useful for small organizations (where everyone will generally know most of what's going on) but the usefulness of the application increases as an organization scales. Once there is too much activity to keep track of it all, Herald allows you to filter it down so you're only notified of things you are interested in.
You can create two kinds of Herald rules, global and personal:
The general idea is to prevent individuals from controlling rules that affect shared resources, so if a rule needs to be updated it's not a big deal if the person who created it is on vacation.
The best way to think of Herald is as a system similar to the mail rules you can set up in most email clients, to organize mail based on "To", "Subject", etc. Herald works very similarly, but operates on Phabricator objects (like revisions and commits) instead of emails.
Every time an object is created or updated, Herald rules are run on it and the actions for any matching rules are taken.
To create a new Herald rule, choose which type of event you want to act on (e.g., changes to Differential Revisions, or Commits), and then set a list of conditions. For example, you might add the condition Author is alincoln (Abraham Lincoln) to keep track of everything alincoln does. Finally, set a list of actions to take when the conditions match, like adding yourself to the CC list.
Now you'll automatically be added to CC any time alincoln creates a revision, and can keep an eye on what he's up to.
Herald rules can take a number of actions. Note that some actions are only available from Global rules, and others only from Personal rules. Additionally, not every action is available for every object type (for instance, you can not trigger an audit based on a Differential revision).
When you've created a rule, use the "Test Console" to test it out. Enter a revision or commit and Herald will do a dry run against that object, showing you which rules would match had it actually been updated. Dry runs executed via the test console don't take any actions.
A few features in Herald are particularly complicated: