diff options
author | Zuul <zuul@review.openstack.org> | 2018-01-08 21:39:48 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2018-01-08 21:39:48 +0000 |
commit | e6de18790c5911fe256ce13c2c3c08607be9a029 (patch) | |
tree | 3a7af51ee68254cbbd56500f89dfed955fb56ed6 | |
parent | 6aa1729626dbcbc20f854b0aecc0af0a2d0ff70a (diff) | |
parent | fc16eb73b3ecff036c0a0ae548fddac9d9ea848a (diff) | |
download | zuul-e6de18790c5911fe256ce13c2c3c08607be9a029.tar.gz |
Merge "Add the project to GithubUser" into feature/zuulv3
-rw-r--r-- | zuul/driver/github/githubconnection.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/zuul/driver/github/githubconnection.py b/zuul/driver/github/githubconnection.py index ef55594bd..48aba888b 100644 --- a/zuul/driver/github/githubconnection.py +++ b/zuul/driver/github/githubconnection.py @@ -341,7 +341,9 @@ class GithubEventConnector(threading.Thread): def _get_sender(self, body): login = body.get('sender').get('login') if login: - return self.connection.getUser(login) + # TODO(tobiash): it might be better to plumb in the installation id + project = body.get('repository', {}).get('full_name') + return self.connection.getUser(login, project=project) def run(self): while True: @@ -981,8 +983,8 @@ class GithubConnection(BaseConnection): log_rate_limit(self.log, github) return reviews - def getUser(self, login): - return GithubUser(self.getGithubClient(), login) + def getUser(self, login, project=None): + return GithubUser(self.getGithubClient(project), login) def getUserUri(self, login): return 'https://%s/%s' % (self.server, login) |