mirror of https://github.com/zulip/zulip.git
webhooks/gitlab: Use branches.find to filter Git notifications.
This commit is contained in:
parent
8900e99ae5
commit
46b6475066
|
@ -361,7 +361,7 @@ def get_event(request, payload, branches):
|
||||||
elif event == 'Push Hook':
|
elif event == 'Push Hook':
|
||||||
if branches is not None:
|
if branches is not None:
|
||||||
branch = get_branch_name(payload)
|
branch = get_branch_name(payload)
|
||||||
if branch not in branches.split(','):
|
if branches.find(branch) == -1:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if event in list(EVENT_FUNCTION_MAPPER.keys()):
|
if event in list(EVENT_FUNCTION_MAPPER.keys()):
|
||||||
|
|
Loading…
Reference in New Issue