Add event type filters and custom message templates for I Done This.
Review Request #8961 — Created Oct. 18, 2017 and updated — Latest diff uploaded
This change provides some customization for messages posted to I Done This.
Event types can be filtered so that only some kinds of activity get posted,
while others do not. For example, the "Reply published" event can be disabled
to reduce noise in I Done This from every single reply getting published.
The posted messages can also be customized independently for every event type.
An empty message causes a fallback to the default format string, which is shown
below the text field for reference. Parameters such as the review request ID,
summary, and URL are substituted into placeholder strings, or omitted from the
final message. The syntax for placeholders is from
string.Template, which is
limited and safer compared to other kinds of string formatting.
New unit tests were added to verify the added functionality, and some existing
tests were updated to test individual event type filtering.
All unit tests pass.
Manually tested event type filtering. Choosing "All events" posts all activity
as before. Choosing a subset of event types only posts those events.
Also specified some custom message template strings and verified that they get
formatted and posted to I Done This, or cause appropriate validation errors.