Including mailing list on pullrequests/comments from Our-Own-Kallithea (OOK)

Dominik Ruf dominikruf at gmail.com
Mon Sep 26 16:58:19 UTC 2016


Mads Kiilerich <mads at kiilerich.com> schrieb am Sa., 24. Sep. 2016 um
18:09 Uhr:

> On 09/24/2016 03:21 PM, Thomas De Schampheleire wrote:
> > Hi,
> >
> > Some of the Kallihea developers have an account on 'our-own-kallithea'
> > which they use to publish proposed Kallithea changes via a pull
> > request. This is all fine for the regular Kallithea developers that
> > also have an account there, but such pull requests are not by default
> > advertised to the mailing list.
>
> +1 from me.
>
> Perhaps base it on Dominik's changes for per repo configuration (which
> we really should get around to land ...) so we can upstream it.
>
> Yeah about that. Is there some thing missing from my part?
What is holding it back?


> /Mads
>
>
> >
> > I wonder if it is much more complex than following code (to be added
> > on OOK only):
> >
> > diff --git a/kallithea/model/notification.py
> b/kallithea/model/notification.py
> > --- a/kallithea/model/notification.py
> > +++ b/kallithea/model/notification.py
> > @@ -106,6 +106,17 @@ class NotificationModel(BaseModel):
> >           if 'threading' in email_kwargs:
> >               headers = {'References': ' '.join('<%s>' % x for x in
> > email_kwargs['threading'])}
> >
> > +        # also send to mailing list
> > +        if type_ in (Notification.TYPE_PULL_REQUEST,
> > Notification.TYPE_PULL_REQUEST_COMMENT,
> > Notification.TYPE_CHANGESET_COMMENT):
> > +            class DummyUser(object):
> > +                """Stub of User class, avoiding add to database"""
> > +                def __init__(self, email):
> > +                    self.email = email
> > +
> > +            # TODO check if mailing lists are to be sent for this repo
> > +            log.debug('Additionally sending notification (type %s to
> > mailing list', type_)
> > +            rec_objs.add(DummyUser('kallithea at example.com'))
> > +
> >           # send email with notification to all other participants
> >           for rec in rec_objs:
> >               ## this is passed into template
> >
> >
> > Where the TODO needs to be still handled...
> >
> > Thanks,
> > Thomas
> > _______________________________________________
> > kallithea-general mailing list
> > kallithea-general at sfconservancy.org
> > http://lists.sfconservancy.org/mailman/listinfo/kallithea-general
>
>
> _______________________________________________
> kallithea-general mailing list
> kallithea-general at sfconservancy.org
> http://lists.sfconservancy.org/mailman/listinfo/kallithea-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sfconservancy.org/pipermail/kallithea-general/attachments/20160926/ed8af257/attachment.html>


More information about the kallithea-general mailing list