Bill Moseley wrote:
I'm using the trac-post-commint-hook.
...
What I'd like is for commits that close a ticket to generate an email
but also to include the diff. That is, when the ticket is closed by
a commit have it include the changeset in the email.
(Starting point, but not full answer:)
Looking at the post-commit-code, it appears that the notification is
made for each closed ticket by calling notify on
trac.Notify.TicketNotifyEmail
(http://projects.edgewall.com/trac/browser/branches/0.9-stable/trac/Notify.py).
at a guess (warning: I've not done any of this!) you could probably
1) subclass TicketNotifyEmail (eg MyTicketNotifyEmail) and override the
template_name with your own custom template...
2) modify the template
3) adjust post-commit-hook to instantiate MyTicketNotifyEmail (maybe
need to give it the changeset id as a param)
-- this seems all fairly straightforward if you know enough python
plus
4) (mystery ingredient) somehow make sure (within MyTicketNotifyEmail)
that the hdf (model behind template) structure includes the changeset
infromation/display. This is certainly beyond my knowledge... but not
the list's!
hth
Tim
_______________________________________________
Trac mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac