github_webhook: Use branches.find to filter Git notifications.

This commit is contained in:
Eeshan Garg 2017-04-24 21:50:39 -02:30 committed by Tim Abbott
parent 047c02781c
commit 8900e99ae5
1 changed files with 1 additions and 1 deletions

View File

@ -417,7 +417,7 @@ def get_event(request, payload, branches):
if is_commit_push_event(payload): if is_commit_push_event(payload):
if branches is not None: if branches is not None:
branch = get_branch_name_from_ref(payload['ref']) branch = get_branch_name_from_ref(payload['ref'])
if branch not in branches.split(','): if branches.find(branch) == -1:
return None return None
return "push_commits" return "push_commits"
else: else: