Branch.name has to use a dot accessor, not a dict lookup

This commit is contained in:
Joseph Schorr 2014-10-03 12:35:58 -04:00
parent a1470460a7
commit e654b2b608

View file

@ -377,7 +377,7 @@ class GithubBuildTrigger(BuildTrigger):
gh_client = self._get_client(auth_token)
source = config['build_source']
repo = gh_client.get_repo(source)
branches = [branch['name'] for branch in repo.get_branches()]
branches = [branch.name for branch in repo.get_branches()]
if not repo.default_branch in branches:
branches.insert(0, repo.default_branch)