TeamCity
 
You are viewing the documentation for an earlier version of TeamCity.

Extending Notification Templates Model

Last modified: 20 April 2023

You can extend data model passed into Customizing Notifications (in TeamCity 5.1) when evaluating.

In your plugin, implement TemplateProcessor interface. The following example can be found in our sample plugin:

public class SampleTemplateProcessor implements TemplateProcessor { public SampleTemplateProcessor() { } @NotNull public Map<String, Object> fillModel(@NotNull NotificationContext context) { Map<String, Object> model = new HashMap<String, Object>(); model.put("users", context.getUsers()); model.put("event", context.getEventType()); return model; } }