Merge "Fix branch parsing in _event_pull"

This commit is contained in:
Zuul
2018-06-27 04:26:30 +00:00
committed by Gerrit Code Review
3 changed files with 48 additions and 19 deletions

View File

@@ -244,7 +244,7 @@ class GithubEventConnector(threading.Thread):
event.newrev = body.get('after')
event.commits = body.get('commits')
ref_parts = event.ref.split('/') # ie, ['refs', 'heads', 'master']
ref_parts = event.ref.split('/', 2) # ie, ['refs', 'heads', 'foo/bar']
if ref_parts[1] == "heads":
# necessary for the scheduler to match against particular branches