#918 Fix the fedmsg hook plugin
Merged by pingou. Opened by pingou.
fix_fedmsg  into  master

Download 918.patch
no initial comment

How about instead of this, do something like this above:

author = pagure.lib.search_user(pagure.SESSION, email=email)
if author:
author = author.to_json(public=True)
else:
author = name

Or something like that?

This is not allowed, because authors is a set and we cannot put a dict in a set (that's why I said in your PR that it wouldn't work)

Then maybe just make it a list?

The idea of the set was to avoid repeating the authors multiple times, avoid sending 3 times the author foo if foo pushed 3 commits

Okay, so maybe just build it as a list, and then create a set() later?

It would still be a list of dict which can't be put in a set

I see...
Okay, I can't come up with a way I'd be more okay with then.

Good enough. :thumbsup:

Thanks for the review and sorry it's not ideal, couldn't figure out a better way either

Pull-Request has been merged by pingou

Metadata