mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 20:02:15 +00:00
github_webhook: Use branches.find to filter Git notifications.
This commit is contained in:
@@ -417,7 +417,7 @@ def get_event(request, payload, branches):
|
||||
if is_commit_push_event(payload):
|
||||
if branches is not None:
|
||||
branch = get_branch_name_from_ref(payload['ref'])
|
||||
if branch not in branches.split(','):
|
||||
if branches.find(branch) == -1:
|
||||
return None
|
||||
return "push_commits"
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user