Ticket #175 (assigned task)

Opened 10 months ago

Last modified 3 weeks ago

support for custom MailNotifier messages

Reported by: bhearsum Assigned to: bhearsum (accepted)
Priority: minor Milestone: undecided
Component: other Version: 0.7.6
Keywords: Cc: warner

Description

I'm thinking this can be implemented as an optional function to pass to MailNotifier?, that would be like buildMessage -- but only deal with formatting (no deferred objects).

Attachments

customMailNotifier-v2.diff (5.5 kB) - added by bhearsum on 04/29/08 12:02:32.
mail notifier custom messages without Deferred support.

Change History

01/29/08 19:12:32 changed by bhearsum

  • owner set to bhearsum.
  • component changed from other to statusplugins.

01/29/08 19:12:39 changed by bhearsum

  • status changed from new to assigned.

01/29/08 19:12:58 changed by bhearsum

My preferred method is to enhance the MailNotifier? to take a message generator function. It's signature would look something like this (with perhaps another argument): def generateMessage(IBuildStatus)

03/24/08 11:30:55 changed by bhearsum

  • cc set to warner.

Hey Brian, I'm planning to do this soon -- does my previous comment seem like a decent impl?

04/28/08 15:08:32 changed by warner

yeah, a function that take an IBuildStatus and produces a string would be fine. Doublecheck that the methods you want to call on IBuildStatus all return synchronously.. if any of them return a Deferred, then your new function will need to return a Deferred too.

Also, having the message-maker function return a Deferred is easy to handle, so you might as well define it to do so. If you like, write it synchronously and I'll update it to handle a Deferred once you're done with it.

04/29/08 12:02:32 changed by bhearsum

  • attachment customMailNotifier-v2.diff added.

mail notifier custom messages without Deferred support.

04/29/08 12:10:15 changed by bhearsum

It turns out that more than just IBuildStatus was useful/important in the generator, but it's still the same basic idea.

I changed "Logs are attached" to "P.S. Logs are attached" (applied after the generator function is called) to avoid the need to pass in addLogs. If someone feels it belongs in the generator though, I won't put up a stink about it.

11/04/08 01:42:42 changed by extremoburo

  • priority changed from major to minor.
  • type changed from enhancement to task.
  • component changed from statusplugins to other.

wouldn't be enough to create a function addText() (something like addLog()) that prepend some custom text to the body of the message in buildstep.py? I think this feature would be very useful.