You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today we don't have a way to describe the path to the names in this kind of a situation.
I propose we add a second level processor that would know to parse the list.
I'd insert something like this into fedbadges/rules.py
self.recipient_list = self._d.get('recipient_list')
self.recipient_list_key = self._d.get('recipient_list_key')
if isinstance(obj, list) and self.recipient_list and self.recipient_list_key:
awardees=[item[self.recipient_list_key] for item in obj]
else:
awardees = obj
I know this needs a test to see if the key exists. I am not sure of the python idiomatically correct to write it.
Any comments?
This would allow us to begin awarding the pagure and docs badges.
The text was updated successfully, but these errors were encountered:
Since @ralphbean has the most experience with this code base as the primary author, his POV is probably most valuable. It sounds good to me, but I'm probably not the best person to ask. I'd love to solve the broken Pagure and docs beat-writing badges.
Pagure sends the authors of a commit in a list of dictionnary. This commit
supports this case by extracting the name from the dictionnary.
Fixes#60
Signed-off-by: Clement Verna <cverna@tutanota.com>
Some fedmsg messages, such as those from pagure return the list of actors/agents in a list. See this snippet from https://apps.fedoraproject.org/datagrepper/id?id=2018-824646b9-0bd1-4b10-a852-ec00dc6ccad7&is_raw=true&size=extra-large
Today we don't have a way to describe the path to the names in this kind of a situation.
I propose we add a second level processor that would know to parse the list.
I'd insert something like this into fedbadges/rules.py
I know this needs a test to see if the key exists. I am not sure of the python idiomatically correct to write it.
Any comments?
This would allow us to begin awarding the pagure and docs badges.
The text was updated successfully, but these errors were encountered: