events: use branch from previous commit for repo push event commits

data so that grouping works, fixes #4233
This commit is contained in:
Daniel Dourvaris 2016-09-19 17:07:37 +03:00
parent aeb0d4526d
commit aa8b5019b1

View file

@ -237,6 +237,11 @@ class RepoPushEvent(RepoVCSEvent):
commits = _commits_as_dict(
commit_ids=self.pushed_commit_ids, repos=[self.repo])
last_branch = None
for commit in reversed(commits):
commit['branch'] = commit['branch'] or last_branch
last_branch = commit['branch']
issues = _issues_as_dict(commits)
branches = set(