Extending Notification Templates Model
Last modified: 20 April 2023You 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; } }
Thanks for your feedback!
Was this page helpful?