Handle pulling the project from ref-updated events
This commit fixes a bug when trying to process ref-update events. The formatting was different for these events was different and the project is a subfield on the refUpdate dict.
This commit is contained in:
parent
74a76a77f0
commit
97c78e78ff
|
@ -87,6 +87,8 @@ def get_topic(base_topic, event):
|
|||
if not project:
|
||||
if 'change' in event:
|
||||
project = event['change'].get('project', '')
|
||||
elif 'refUpdate' in event:
|
||||
project = event['refUpdate'].get('project', '')
|
||||
pieces = [base_topic, project, event_type]
|
||||
topic = "/".join(pieces)
|
||||
return topic
|
||||
|
|
Loading…
Reference in New Issue