Specific use case for the request was "subscribe to every edit", but one can imagine other similar uses. Some fields which might make sense are:
- Path
- Title
- Body
Specific use case for the request was "subscribe to every edit", but one can imagine other similar uses. Some fields which might make sense are:
rP Phabricator | |||
D10830 | rP8e1a4eef0400 T4666, Support Herald in Phriction |
Status | Assigned | Task | ||
---|---|---|---|---|
Resolved | lpriestley | T4666 Support Herald in Phriction | ||
Resolved | btrahan | T4029 Support policies on Phriction wiki articles |
Herald allows users to write rules which react to changes in objects they care about (for example, by notifying the user of the change). We'd like to support Phriction (the wiki) in Herald, so users can easily monitor changes to wiki pages. (One example use case is that I'd personally like to be notified about any edit to any wiki page on this install).
This was blocked technically on T4029, but @btrahan recently completed the work there.
The main driver is a new Adapter class, which lets Herald interact with other systems.
The adapter defines how Herald interacts with an application. In particular, you'll want to implement:
This will let users write rules like "When an edited document's path starts with x/y/z/, send me an email" to watch all documents under "x/y/z/". You may want to start by implementing just one field (probably "Path") and adding the rest later.
To actually create a rule, go to Herald > Create Herald Rule. Once you have a skeleton adapter, your new rule type should show up there and you should be able to start creating a rule.
After creating a rule works, you'll modify PhrictionTransactionEditor to actually make the rules fire when a document is edited. You can look at PholioMockEditor for an example. Likely, you'll implement shouldApplyHeraldRules(), buildHeraldAdapter(), and didApplyHeraldRules().
The Herald UI has some tools (like transcripts and the test console) which can help you debug the behavior of your adapter once it's up and running.